dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

commit 7ba0de3904e58477d82f506dd1f945542d1d6c46
parent d4529ec2d31ecbb82d0a3376741e4513bc937d2f
Author: Lukas Henkel <lh@entf.net>
Date:   Sat, 30 Jul 2022 13:35:48 +0200

Add csharp-mode

Diffstat:
Aelpa/csharp-mode-1.1.1.signed | 2++
Aelpa/csharp-mode-1.1.1/.github/workflows/build.yml | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/Cask | 4++++
Aelpa/csharp-mode-1.1.1/LICENSE | 674+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/README.org | 111+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/csharp-compilation.el | 144+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/csharp-mode-autoloads.el | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/csharp-mode-pkg.el | 2++
Aelpa/csharp-mode-1.1.1/csharp-mode-tests.el | 369+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/csharp-mode.el | 595+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/csharp-tree-sitter.el | 425+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/makefile | 24++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/devenv-error.txt | 25+++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/devenv-mixed-error.txt | 39+++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/dotnet-nuget-error.txt | 1+
Aelpa/csharp-mode-1.1.1/test-files/dotnet-nuget-warning.txt | 1+
Aelpa/csharp-mode-1.1.1/test-files/dotnet-test-fail-xunit.txt | 8++++++++
Aelpa/csharp-mode-1.1.1/test-files/fontification-test-compiler-directives-with-comments.cs | 5+++++
Aelpa/csharp-mode-1.1.1/test-files/fontification-test-compiler-directives.cs | 23+++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/fontification-test.cs | 6++++++
Aelpa/csharp-mode-1.1.1/test-files/imenu-comment-test.cs | 16++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/imenu-delegate-test.cs | 12++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/imenu-field-keyword-test.cs | 19+++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/imenu-generics-test.cs | 19+++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/imenu-interface-property-test.cs | 24++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/imenu-method-test.cs | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/imenu-namespace-test.cs | 16++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/indentation-tests.cs | 257+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/msbuild-concurrent-error.txt | 30++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/msbuild-concurrent-warning.txt | 36++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/msbuild-error.txt | 32++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/msbuild-square-brackets.txt | 37+++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/msbuild-warning.txt | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/multiline-strings.cs | 10++++++++++
Aelpa/csharp-mode-1.1.1/test-files/namespace-fontification.cs | 15+++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/region-fontification.cs | 44++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/this-fontification.cs | 30++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/using-fontification.cs | 4++++
Aelpa/csharp-mode-1.1.1/test-files/xbuild-error.txt | 47+++++++++++++++++++++++++++++++++++++++++++++++
Aelpa/csharp-mode-1.1.1/test-files/xbuild-warning.txt | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Minit.el | 2+-
41 files changed, 3417 insertions(+), 1 deletion(-)

diff --git a/elpa/csharp-mode-1.1.1.signed b/elpa/csharp-mode-1.1.1.signed @@ -0,0 +1 @@ +Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2021-11-24T23:05:02+0100 using RSA +\ No newline at end of file diff --git a/elpa/csharp-mode-1.1.1/.github/workflows/build.yml b/elpa/csharp-mode-1.1.1/.github/workflows/build.yml @@ -0,0 +1,70 @@ +name: Build & Test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + unix-build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-18.04, ubuntu-latest] + emacs: [26.1, 26.2, 26.3, 27.1, 27.2, snapshot] + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: "3.6" + architecture: "x64" + + - uses: purcell/setup-emacs@master + with: + version: ${{ matrix.emacs }} + + - uses: conao3/setup-cask@master + with: + version: 0.8.4 + + - name: paths + run: | + echo "$HOME/.cask/bin" >> $GITHUB_PATH + + - name: Run a multi-line script + run: | + emacs --version + make test + + windows-build: + runs-on: windows-latest + strategy: + matrix: + emacs: [26.1, 26.2, 26.3, 27.1, 27.2, snapshot] + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: "3.6" + architecture: "x64" + + - uses: jcs090218/setup-emacs-windows@master + with: + version: ${{ matrix.emacs }} + + - uses: conao3/setup-cask@master + with: + version: 0.8.4 + + - name: Run a multi-line script + run: | + emacs --version + make test diff --git a/elpa/csharp-mode-1.1.1/Cask b/elpa/csharp-mode-1.1.1/Cask @@ -0,0 +1,4 @@ +(source gnu) +(source melpa) + +(package-file "csharp-mode.el") diff --git a/elpa/csharp-mode-1.1.1/LICENSE b/elpa/csharp-mode-1.1.1/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + A major mode for editing C# in emacs. + Copyright (C) 2020 Theodor Thornhill and contributors + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + csharp-mode.el Copyright (C) 2020 Theodor Thornhill and contributors + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/elpa/csharp-mode-1.1.1/README.org b/elpa/csharp-mode-1.1.1/README.org @@ -0,0 +1,111 @@ +[[https://github.com/emacs-csharp/csharp-mode/actions][file:https://github.com/emacs-csharp/csharp-mode/workflows/Build%20&%20Test/badge.svg?branch=master]] +[[https://melpa.org/#/csharp-mode][file:https://melpa.org/packages/csharp-mode-badge.svg]] +[[https://stable.melpa.org/#/csharp-mode][file:https://stable.melpa.org/packages/csharp-mode-badge.svg]] +[[https://elpa.gnu.org/packages/csharp-mode.html][file:https://elpa.gnu.org/packages/csharp-mode.svg]] +* csharp-mode + +This is a mode for editing C# in emacs. It's using CC mode or [[https://github.com/ubolonton/emacs-tree-sitter][tree-sitter]] for +highlighting and indentation. + +** Main features + +- font-lock and indent of C# syntax including: + - all c# keywords and major syntax + - attributes that decorate methods, classes, fields, properties + - enum types + - #if/#endif #region/#endregion + - instance initializers + - anonymous functions and methods + - verbatim literal strings (those that begin with @) + - generics +- intelligent insertion of matched pairs of curly braces. +- compilation-mode support for msbuild, devenv and xbuild. + +** tree-sitter support +You can enable experimental tree sitter support for indentation and highlighting using +#+begin_src elisp + (use-package tree-sitter :ensure t) + (use-package tree-sitter-langs :ensure t) + + (use-package csharp-mode + :ensure t + :config + (add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-tree-sitter-mode))) +#+end_src +If you are using this, clearly state so if you find any issues. + +Note that we don't depend on tree-sitter yet, so you have to manually install +the packages involved. The simplest way is to use the provided snippet above. + +*** Using and evolving the tree-sitter functionality. +=tree-sitter= introduces a minor mode called =tree-sitter-debug-mode= where you can +look at the actual syntax tree it produces. If and when you spot missing or +wrong syntax highlighting, look at how the patterns are written in +=csharp-tree-sitter-mode.el=, then submit a pr with a couple new ones added. When +testing and debugging this, it is actually as simple as =M-x eval-buffer= on +=csharp-tree-sitter-mode.el=, then =M-x revert-buffer= in the file you are testing. +It should update and show the correct syntax highlighting. + + +So the development cycle is: +- Spot missing syntax highlighting +- View AST with =tree-sitter-debug-mode= +- Locate offending part +- Add new pattern +- =M-x eval-buffer= in =csharp-tree-sitter-mode.el= +- =M-x revert-buffer= inside your =some-test-file.cs= + + +** Usage + +This package is currently available on both ELPA and MELPA. Install using ~M-x +package-install<RET>csharp-mode~. + +Once installed the package should be automatically used for files with a '.cs'-extension. + +Note: This package is also available on [[http://stable.melpa.org/][MELPA-stable]] for those who don't want or need +bleeding edge development-versions. + +For a better experience you may want to enable electric-pair-mode when editing C#-files. +To do so, add the following to your .emacs-file: + +#+BEGIN_SRC emacs-lisp + (defun my-csharp-mode-hook () + ;; enable the stuff you want for C# here + (electric-pair-mode 1) ;; Emacs 24 + (electric-pair-local-mode 1) ;; Emacs 25 + ) + (add-hook 'csharp-mode-hook 'my-csharp-mode-hook) +#+END_SRC + +For further mode-specific customization, ~M-x customize-group RET csharp RET~ will show available settings with documentation. + +For more advanced and IDE-like functionality we recommend using csharp-mode together +with [[https://github.com/emacs-lsp/lsp-mode][lsp-mode]] or [[https://github.com/joaotavora/eglot][eglot]] + +* Attribution + +This repo was a fork of the code originally developed by Dylan R. E. Moonfire and +further maintained by Dino Chiesa as hosted on [[https://code.google.com/p/csharpmode/][Google code]]. + +** New focus + +The original csharp-mode repo contained lots of different code for lots of different purposes, +some finished, some not, some experimental, some not. Basiaclly things like ASPX-mode, TFS-mode, +code completion backends, etc. + +All this original code can still be found in the [[https://github.com/josteink/csharp-mode/tree/extras][extras-branch]], but we have decided to +go for a more focused approach and to throw out all dead or unused code, code we wont +be maintaining. + +The goal: That what we package in csharp-mode actually works and works well. + +* ELPA +This package aims to stay as close to mainline emacs as it can. As such, +paperwork with the FSF is needed for contributions of significant size. + + +* License + +The original project was licensed under [[https://www.gnu.org/licenses/gpl-2.0.html][GPL v2+]], but after a rewrite in September +2020, it was relicensed to GPLv3+ diff --git a/elpa/csharp-mode-1.1.1/csharp-compilation.el b/elpa/csharp-mode-1.1.1/csharp-compilation.el @@ -0,0 +1,144 @@ +;;; csharp-compilation.el --- compilation support for C# -*- lexical-binding: t; -*- + +;; Copyright (C) 2020-2021 Free Software Foundation, Inc. + +;; Author : Theodor Thornhill <theo@thornhill.no> +;; Maintainer : Jostein Kjønigsen <jostein@gmail.com> +;; Theodor Thornhill <theo@thornhill.no> +;; Created : September 2020 +;; Modified : 2020 +;; Version : 1.1.1 +;; Keywords : c# languages oop mode +;; X-URL : https://github.com/emacs-csharp/csharp-mode + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <http://www.gnu.org/licenses/>. + + +(require 'compile) + +;; When invoked by MSBuild, csc’s errors look like this: +;; subfolder\file.cs(6,18): error CS1006: Name of constructor must +;; match name of class [c:\Users\user\project.csproj] + +(defun csharp--compilation-error-file-resolve () + "Resolve an msbuild error to a (filename . dirname) cons cell." + ;; http://stackoverflow.com/a/18049590/429091 + (cons (match-string 1) (file-name-directory (match-string 4)))) + +(defconst csharp-compilation-re-msbuild-error + (concat + "^[[:blank:]]*\\(?:[[:digit:]]+>\\)?" + "\\([^(\r\n)]+\\)(\\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)?): " + "error [[:alnum:]]+: [^\r\n]+\\[\\([^]\r\n]+\\)\\]$") + "Regexp to match compilation error from msbuild.") + +(defconst csharp-compilation-re-msbuild-warning + (concat + "^[[:blank:]]*\\(?:[[:digit:]]+>\\)?" + "\\([^(\r\n)]+\\)(\\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)?): " + "warning [[:alnum:]]+: [^\r\n]+\\[\\([^]\r\n]+\\)\\]$") + "Regexp to match compilation warning from msbuild.") + +;; Notes on xbuild and devenv commonalities +;; +;; These regexes were tailored for xbuild, but apart from the concurrent +;; build-marker ("1>") they share exactly the same match-markers. +;; +;; If we don't exclude the match-markers explicitly, these regexes +;; will also be used to match for devenv as well, including the build-marker +;; in the file-name, causing the lookup to fail. +;; +;; So if we don't want devenv to fail, we actually need to handle it in our +;; xbuild-regexes, but then we automatically get devenv-support for free. + +(defconst csharp-compilation-re-xbuild-error + (concat + "^[[:blank:]]*\\(?:[[:digit:]]+>\\)?" + "\\([^(\r\n)]+\\)(\\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)?" + ;; handle weird devenv output format with 4 numbers, not 2 by having optional + ;; extra capture-groups. + "\\(?:,\\([0-9]+\\)\\)*): " + "error [[:alnum:]]+: .+$") + "Regexp to match compilation error from xbuild.") + +(defconst csharp-compilation-re-xbuild-warning + (concat + "^[[:blank:]]*\\(?:[[:digit:]]+>\\)?" + "\\([^(\r\n)]+\\)(\\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)?" + ;; handle weird devenv output format with 4 numbers, not 2 by having optional + ;; extra capture-groups. + "\\(?:,\\([0-9]+\\)\\)?*): " + "warning [[:alnum:]]+: .+$") + "Regexp to match compilation warning from xbuild.") + +(defconst csharp-compilation-re-dotnet-error + "\\([^\r\n]+\\) : error [A-Z]+[0-9]+:") + +(defconst csharp-compilation-re-dotnet-warning + "\\([^\r\n]+\\) : warning [A-Z]+[0-9]+:") + +(defconst csharp-compilation-re-dotnet-testfail + (concat + "^[[:blank:]]+X \\(?:.+\n\\)" + "[[:blank:]]+Error Message:\n" + "[[:blank:]]+\\(?:.+\n\\)" + "\\(?:^Expected: \\(?:.+\n\\)\\)?" + "\\(?:^Actual: \\(?:.+\n\\)\\)?" + "[[:blank:]]+Stack Trace:\n" + "[[:blank:]]+at [^\n]+ in \\([^\n]+\\):line \\([0-9]+\\)")) + + +(eval-after-load 'compile + (lambda () + (dolist + (regexp + `((dotnet-testfail + ,csharp-compilation-re-dotnet-testfail + 1 2) + (xbuild-error + ,csharp-compilation-re-xbuild-error + 1 2 3 2) + (xbuild-warning + ,csharp-compilation-re-xbuild-warning + 1 2 3 1) + (msbuild-error + ,csharp-compilation-re-msbuild-error + csharp--compilation-error-file-resolve + 2 + 3 + 2 + nil + (1 compilation-error-face) + (4 compilation-error-face)) + (msbuild-warning + ,csharp-compilation-re-msbuild-warning + csharp--compilation-error-file-resolve + 2 + 3 + 1 + nil + (1 compilation-warning-face) + (4 compilation-warning-face)) + (dotnet-error + ,csharp-compilation-re-dotnet-error + 1) + (dotnet-warning + ,csharp-compilation-re-dotnet-warning + 1 nil nil 1))) + (add-to-list 'compilation-error-regexp-alist-alist regexp) + (add-to-list 'compilation-error-regexp-alist (car regexp))))) + +(provide 'csharp-compilation) + +;;; csharp-compilation.el ends here diff --git a/elpa/csharp-mode-1.1.1/csharp-mode-autoloads.el b/elpa/csharp-mode-1.1.1/csharp-mode-autoloads.el @@ -0,0 +1,58 @@ +;;; csharp-mode-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- +;; Generated by the `loaddefs-generate' function. + +;; This file is part of GNU Emacs. + +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + + +;;; Generated autoloads from csharp-compilation.el + +(register-definition-prefixes "csharp-compilation" '("csharp-")) + + +;;; Generated autoloads from csharp-mode.el + +(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode)) +(autoload 'csharp-mode "csharp-mode" "\ +Major mode for editing Csharp code. + +Key bindings: +\\{csharp-mode-map} + +(fn)" t nil) +(register-definition-prefixes "csharp-mode" '("codedoc-font-lock-" "csharp-")) + + +;;; Generated autoloads from csharp-mode-tests.el + +(register-definition-prefixes "csharp-mode-tests" '("assess-face-in-" "c-mode-hook-run" "csharp-hook" "debug-res" "list-repeat-once")) + + +;;; Generated autoloads from csharp-tree-sitter.el + +(autoload 'csharp-tree-sitter-mode "csharp-tree-sitter" "\ +Major mode for editing Csharp code. + +Key bindings: +\\{csharp-tree-sitter-mode-map} + +(fn)" t nil) +(register-definition-prefixes "csharp-tree-sitter" '("csharp-" "tree-sitter-indent-csharp-tree-sitter-scopes")) + +;;; End of scraped data + +(provide 'csharp-mode-autoloads) + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8-emacs-unix +;; End: + +;;; csharp-mode-autoloads.el ends here diff --git a/elpa/csharp-mode-1.1.1/csharp-mode-pkg.el b/elpa/csharp-mode-1.1.1/csharp-mode-pkg.el @@ -0,0 +1,2 @@ +;; Generated package description from csharp-mode.el -*- no-byte-compile: t -*- +(define-package "csharp-mode" "1.1.1" "C# mode derived mode" '((emacs "26.1")) :authors '(("Theodor Thornhill" . "theo@thornhill.no")) :maintainer '("Jostein Kjønigsen" . "jostein@gmail.com") :keywords '("c#" "languages" "oop" "mode") :url "https://github.com/emacs-csharp/csharp-mode") diff --git a/elpa/csharp-mode-1.1.1/csharp-mode-tests.el b/elpa/csharp-mode-1.1.1/csharp-mode-tests.el @@ -0,0 +1,369 @@ +;;; csharp-mode-tests.el --- Tests for csharp-mode.el -*- lexical-binding: t; -*- + +;; Copyright (C) 2020-2021 Free Software Foundation, Inc. + +;; Author: Josten Kjønigsen <jostein@gmail.com> +;; Keywords: tests + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <https://www.gnu.org/licenses/>. + +(require 'ert) +(require 'cl-lib) +(require 'csharp-mode) +(require 'package) + +;; development only packages, not declared as a package-dependency +;; FIXME: loading a .el file from `load-path' should not change user's settings +;; like that. It can happen without the user explicitly requesting it! +(package-initialize) +(add-to-list 'package-archives '("melpa" . "https://stable.melpa.org/packages/")) + +;; required to resolve SEQ (or anything on elpa) on Emacs25. +(setq package-check-signature nil) + +;; assess depends on dash 2.12.1, which is no longer available +;; installing dash, resolves 2.13.0, and fixes this broken dependency. +(dolist (p '(dash assess)) + (when (not (package-installed-p p)) + (package-refresh-contents) + (package-install p))) + +;;; test-helper functions + +(defmacro assess-face-in-text= (testee &rest assessments) + (when assessments + (let* ((text (car assessments)) + (face (cadr assessments)) + (rest (cddr assessments))) + `(progn + (require 'assess) + (should (assess-face-at= ,testee 'csharp-mode ,text ,face)) + (assess-face-in-text= ,testee ,@rest))))) + +(defmacro assess-face-in-file= (file-name &rest assessments) + (let* ((find-file-hook nil) ;; disable vc-mode hooks + (buffer (find-file-read-only file-name)) + (contents (buffer-substring-no-properties (point-min) (point-max)))) + (kill-buffer buffer) + `(assess-face-in-text= ,contents ,@assessments))) + +;;; actual tests + +(ert-deftest activating-mode-doesnt-cause-failure () + (with-temp-buffer + (csharp-mode) + (should + (equal 'csharp-mode major-mode)))) + +(defvar debug-res nil) + +(ert-deftest fontification-of-literals-detects-end-of-strings () + (assess-face-in-file= "./test-files/fontification-test.cs" + "bool1" 'font-lock-type-face + "Reference1" 'font-lock-variable-name-face + "false" 'font-lock-constant-face + "bool2" 'font-lock-type-face + "Reference2" 'font-lock-variable-name-face + "true" 'font-lock-constant-face + )) + +(when (and (>= emacs-major-version 29) + (string-lessp "5.35.0" c-version)) + (ert-deftest fontification-of-multiline-strings () + (assess-face-in-file= "./test-files/multiline-strings.cs" + "Literal0" 'font-lock-variable-name-face + "Literal1" 'font-lock-variable-name-face + "Literal2" 'font-lock-variable-name-face + "Literal3" 'font-lock-variable-name-face + "Literal4" 'font-lock-variable-name-face + "Literal5" 'font-lock-variable-name-face + "Literal6" 'font-lock-variable-name-face + "Literal7" 'font-lock-variable-name-face))) + +(ert-deftest fontification-of-constants () + (require 'assess) + (assess-face-in-text= + "testBool1 = true;\ntestBool2 = false;\ntestObj = null;\ntestProp = value;" + "false" 'font-lock-constant-face + "true" 'font-lock-constant-face + "null" 'font-lock-constant-face + "value" 'font-lock-constant-face + )) + +(ert-deftest fontification-of-package () + (require 'assess) + (assess-face-in-text= + "var package = true;" + "package" 'font-lock-variable-name-face)) + +(ert-deftest fontification-of-functions () + (require 'assess) + (assess-face-in-text= "var foo = bar.Baz()" + "Baz" 'font-lock-function-name-face) + (assess-face-in-text= "var foo = bar.Baz<Quux>()" + "Baz" 'font-lock-function-name-face + "Quux" 'font-lock-type-face)) + +(ert-deftest fontification-of-import () + (require 'assess) + (assess-face-in-text= + "var import = true;" + "import" 'font-lock-variable-name-face)) + +(ert-deftest fontification-of-literals-allows-multi-line-strings () + (require 'assess) + (should (assess-face-at= + "string Literal = \"multi-line\nstring\";" + 'csharp-mode + ;; should be interpreted as error + 18 'font-lock-warning-face + )) + (should (assess-face-at= + "string Literal = @\"multi-line\nstring\";" + 'csharp-mode + ;; should not be interpreted as error because of @ + 19 'font-lock-string-face + ))) + +;; (ert-deftest fontification-of-compiler-directives () +;; ;; this replaces the manual test of +;; ;; test-files/fontification-test-compiler-directives.cs, but file +;; ;; has been kept around to assist manual testing/verification. +;; (assess-face-in-file= "test-files/fontification-test-compiler-directives.cs" +;; "strReference" 'font-lock-string-face +;; "strVerification" 'font-lock-string-face +;; "singleQuote" 'font-lock-string-face +;; "doubleQuote" 'font-lock-string-face) + +;; (assess-face-in-text= +;; "#region test\nbool bar = true;" +;; ;; should not be interpreted as string because of trailing \! +;; "bool" 'font-lock-type-face +;; "bar" 'font-lock-variable-name-face +;; "true" 'font-lock-constant-face +;; ) +;; (should (assess-face-at= +;; "#region test'\nx = true;" +;; 'csharp-mode +;; ;; should not be interpreted as string because of trailing \! +;; "true" 'font-lock-constant-face +;; )) +;; (should (assess-face-at= +;; "#region test\"\nx = true;" +;; 'csharp-mode +;; ;; should not be interpreted as string because of trailing \! +;; "true" 'font-lock-constant-face +;; ))) + +(ert-deftest fontification-of-compiler-directives-after-comments () + (assess-face-in-file= "./test-files/fontification-test-compiler-directives-with-comments.cs" + "case1" 'font-lock-comment-face + "case2" 'font-lock-comment-face)) + +(ert-deftest fontification-of-method-names () + (assess-face-in-file= "./test-files/imenu-method-test.cs" + "OpenWebServicesAsync" 'font-lock-function-name-face + "ToString" 'font-lock-function-name-face + "Equals" 'font-lock-function-name-face + "AbstractMethod" 'font-lock-function-name-face + "UnsafeCopy" 'font-lock-function-name-face + ;; "GenericMethod1" 'font-lock-function-name-face + ;; "GenericMethod2" 'font-lock-function-name-face + )) + +(ert-deftest fontification-of-using-statements () + (assess-face-in-file= "./test-files/using-fontification.cs" + "using" 'font-lock-keyword-face + "Reference" 'font-lock-variable-name-face + "Under_scored" 'font-lock-variable-name-face + "WithNumbers09" 'font-lock-variable-name-face + "Ok" 'font-lock-variable-name-face + "WithNumbers09" 'font-lock-variable-name-face + "OkV2" 'font-lock-variable-name-face + )) + +(ert-deftest fontification-of-namespace-statements () + (assess-face-in-file= "./test-files/namespace-fontification.cs" + "namespace" 'font-lock-keyword-face + "Reference" 'font-lock-variable-name-face + "Under_scored" 'font-lock-variable-name-face + "WithNumbers09" 'font-lock-variable-name-face + "Ok" 'font-lock-variable-name-face + "WithNumbers09" 'font-lock-variable-name-face + "Ok" 'font-lock-variable-name-face + )) + +(defun list-repeat-once (mylist) + (append mylist mylist)) + +(ert-deftest build-warnings-and-errors-are-parsed () + (dolist (test-case + `(("./test-files/msbuild-warning.txt" ,csharp-compilation-re-msbuild-warning + ,(list-repeat-once + '("Class1.cs" + "Folder\\Class1.cs" + "Program.cs" + "Program.cs"))) + ("./test-files/msbuild-error.txt" ,csharp-compilation-re-msbuild-error + ,(list-repeat-once + '("Folder\\Class1.cs"))) + ("./test-files/msbuild-concurrent-warning.txt" ,csharp-compilation-re-msbuild-warning + ,(list-repeat-once + '("Program.cs"))) + ("./test-files/msbuild-concurrent-error.txt" ,csharp-compilation-re-msbuild-error + ,(list-repeat-once + '("Program.cs"))) + ("./test-files/msbuild-square-brackets.txt" ,csharp-compilation-re-msbuild-error + ,(list-repeat-once + '("Properties\\AssemblyInfo.cs" + "Program.cs" + "Program.cs"))) + ("./test-files/msbuild-square-brackets.txt" ,csharp-compilation-re-msbuild-warning + ,(list-repeat-once + '("Program.cs"))) + ("./test-files/xbuild-warning.txt" ,csharp-compilation-re-xbuild-warning + ,(list-repeat-once + '("/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Class1.cs" + "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Folder/Class1.cs" + "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs" + "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs" + "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs"))) + ("./test-files/xbuild-error.txt" ,csharp-compilation-re-xbuild-error + ,(list-repeat-once + '("/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Folder/Class1.cs"))) + ("./test-files/devenv-error.txt" ,csharp-compilation-re-xbuild-error + ("c:\\working_chad\\dev_grep\\build_grep_database\\databaseconnection.cpp" + "c:\\working_chad\\dev_grep\\build_grep_database\\databaseconnection.cpp" + "c:\\working_chad\\dev_grep\\build_grep_database\\databaseconnection.cpp")) + ("./test-files/devenv-error.txt" ,csharp-compilation-re-xbuild-warning + ("c:\\working_chad\\dev_grep\\build_grep_database\\databaseconnection.cpp")) + ("./test-files/devenv-mixed-error.txt" ,csharp-compilation-re-xbuild-error + ("C:\\inservice\\SystemTesting\\OperateDeviceProxy\\OperateDevice_Proxy\\Program.cs" + "C:\\inservice\\SystemTesting\\OperateDeviceProxy\\OperateDevice_Proxy\\Program.cs" + "C:\\inservice\\SystemTesting\\OperateDeviceProxy\\OperateDevice_Proxy\\Program.cs" + "c:\\inservice\\systemtesting\\operationsproxy\\operationsproxy.cpp" + "c:\\inservice\\systemtesting\\operationsproxy\\operationsproxy.cpp" + "c:\\inservice\\systemtesting\\operationsproxy\\operationsproxy.cpp")) + + ("./test-files/dotnet-nuget-error.txt" ,csharp-compilation-re-dotnet-error + ("/home/jostein/build/sample-app/sample-app.csproj")) + ("./test-files/dotnet-nuget-warning.txt" ,csharp-compilation-re-dotnet-warning + ("/home/jostein/build/sample-app/sample-app.csproj")) + ("./test-files/dotnet-test-fail-xunit.txt" ,csharp-compilation-re-dotnet-testfail + ("/home/jostein/build/sample-app/Module/Testee.cs")))) + + (let* ((file-name (car test-case)) + (regexp (cadr test-case)) + (matched-file-names (cl-caddr test-case)) + (times (length matched-file-names)) + (find-file-hook '()) ;; avoid vc-mode file-hooks when opening! + (buffer (find-file-read-only file-name))) + ;; (message (concat "Testing compilation-log: " file-name)) + (dotimes (number times) + (let* ((expected (nth number matched-file-names))) + ;; (message (concat "- Expecting match: " expected)) + (re-search-forward regexp) + (should + (equal expected (match-string 1))))) + (kill-buffer buffer)))) + +(defvar csharp-hook1 nil) +(defvar csharp-hook2 nil) + +(ert-deftest activating-mode-triggers-all-hooks () + (add-hook 'csharp-mode-hook (lambda () (setq csharp-hook1 t))) + (add-hook 'prog-mode-hook (lambda () (setq csharp-hook2 t))) + + (with-temp-buffer + (csharp-mode) + (should (equal t (and csharp-hook1 + csharp-hook2))))) + +(defvar c-mode-hook-run nil) +(ert-deftest avoid-runing-c-mode-hook () + (add-hook 'c-mode-hook (lambda () (setq c-mode-hook-run t))) + + (with-temp-buffer + (csharp-mode) + (should-not c-mode-hook-run))) + +(ert-deftest indentation-rules-should-be-as-specified-in-test-doc () + (let* ((buffer (find-file "test-files/indentation-tests.cs")) + (orig-content) + (indented-content)) + ;; double-ensure mode is active + (csharp-mode) + + (setq orig-content (buffer-substring-no-properties (point-min) (point-max))) + (indent-region (point-min) (point-max)) + (setq indented-content (buffer-substring-no-properties (point-min) (point-max))) + + (should (equal orig-content indented-content)))) + +(ert-deftest region-directive-comment-movement () + (find-file "test-files/region-fontification.cs") + (csharp-mode) + (goto-char (point-min)) + (search-forward "#region ") + (forward-word 1) + (forward-word -1) + (should (looking-at "fontifies"))) + +;; (ert-deftest fontification-of-regions () +;; (require 'assess) +;; (require 'm-buffer) +;; (find-file "test-files/region-fontification.cs") +;; (csharp-mode) +;; (let ((buf (current-buffer))) +;; ;; look for 'a region comment' - should always be a comment +;; (should (assess-face-at= buf 'csharp-mode (lambda (buf) (m-buffer-match buf "a region comment")) 'font-lock-comment-face)) +;; ;; look for 'string' - should always be a type +;; (should (assess-face-at= buf 'csharp-mode (lambda (buf) (m-buffer-match buf "string")) 'font-lock-type-face)))) + +(ert-deftest activating-mode-doesnt-clobber-global-adaptive-fill-regexp () + (let ((before adaptive-fill-regexp)) + (with-temp-buffer + (csharp-mode)) + (should + (equal before adaptive-fill-regexp)))) + +(ert-deftest activating-mode-style-defaults-to-csharp () + (with-temp-buffer + (csharp-mode) + (should + (equal "csharp" c-indentation-style))) + + (let ((c-default-style "csharp")) + (with-temp-buffer + (csharp-mode) + (should + (equal "csharp" c-indentation-style)))) + + (let ((c-default-style '((csharp-mode . "csharp") + (java-mode . "java")))) + (with-temp-buffer + (csharp-mode) + (should + (equal "csharp" c-indentation-style))))) + +(ert-deftest inside-bracelist-test () + (with-temp-buffer + (csharp-mode) + (insert "public class A { public void F() {") + (call-interactively #'newline))) + +;;(ert-run-tests-interactively t) +;; (local-set-key (kbd "<f6>") '(lambda () +;; (interactive) +;; (ert-run-tests-interactively t))) diff --git a/elpa/csharp-mode-1.1.1/csharp-mode.el b/elpa/csharp-mode-1.1.1/csharp-mode.el @@ -0,0 +1,595 @@ +;;; csharp-mode.el --- C# mode derived mode -*- lexical-binding: t; -*- + +;; Copyright (C) 2020-2021 Free Software Foundation, Inc. + +;; Author : Theodor Thornhill <theo@thornhill.no> +;; Maintainer : Jostein Kjønigsen <jostein@gmail.com> +;; Theodor Thornhill <theo@thornhill.no> +;; Created : September 2020 +;; Modified : 2020 +;; Version : 1.1.1 +;; Keywords : c# languages oop mode +;; X-URL : https://github.com/emacs-csharp/csharp-mode +;; Package-Requires: ((emacs "26.1")) + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <http://www.gnu.org/licenses/>. + + +;;; Code: + + +(require 'cc-mode) +(require 'cc-langs) + +(eval-when-compile + (require 'cc-fonts)) + +(require 'csharp-compilation) + +(defgroup csharp nil + "Major mode for editing C# code." + :group 'prog-mode) + +(eval-and-compile + (defconst csharp--regex-identifier + "[A-Za-z][A-Za-z0-9_]*" + "Regex describing an dentifier in C#.") + + (defconst csharp--regex-identifier-matcher + (concat "\\(" csharp--regex-identifier "\\)") + "Regex matching an identifier in C#.") + + (defconst csharp--regex-type-name + "[A-Z][A-Za-z0-9_]*" + "Regex describing a type identifier in C#.") + + (defconst csharp--regex-type-name-matcher + (concat "\\(" csharp--regex-type-name "\\)") + "Regex matching a type identifier in C#.") + + (defconst csharp--regex-using-or-namespace + (concat "^using" "\\|" "namespace" + "\\s *" + csharp--regex-type-name-matcher) + "Regex matching identifiers after a using or namespace + declaration.")) + +(eval-and-compile + (c-add-language 'csharp-mode 'java-mode)) + +(c-lang-defconst c-make-mode-syntax-table + csharp `(lambda () + (let ((table (make-syntax-table))) + (c-populate-syntax-table table) + (modify-syntax-entry ?@ "_" table) + table))) + +(c-lang-defconst c-identifier-syntax-modifications + csharp (append '((?@ . "w")) + (c-lang-const c-identifier-syntax-modifications))) + +(c-lang-defconst c-symbol-start + csharp (concat "[" c-alpha "_@]")) + +(c-lang-defconst c-opt-type-suffix-key + csharp (concat "\\(\\[" (c-lang-const c-simple-ws) "*\\]\\|\\?\\)")) + +(c-lang-defconst c-identifier-ops + csharp '((left-assoc "."))) + +(c-lang-defconst c-overloadable-operators + csharp '("+" "-" "*" "/" "%" "&" "|" "^" "<<" ">>" "==" + "!=" ">" "<" ">=" "<=")) + +(c-lang-defconst c-multiline-string-start-char + csharp ?@) + +(c-lang-defconst c-ml-string-opener-re + ;; "\\(\\(?:@\\$?\\)\\(\"\\)\\)" + csharp + (rx + (group + (or "@" "@$") + (group "\"")))) + +(c-lang-defconst c-ml-string-max-opener-len + csharp 3) + +(c-lang-defconst c-ml-string-max-closer-len + csharp 2) + +(c-lang-defconst c-ml-string-any-closer-re + ;; "\\(?:\"\"\\)*\\(\\(\"\\)\\)\\(?:[^\"]\\|\\'\\)" + csharp + (rx + (seq + (zero-or-more "\"\"") + (group + (group "\"")) + (or (not (any "\"")) eos)))) + +(c-lang-defconst c-ml-string-back-closer-re + ;; "\\(?:\\`\\|[^\"]\\)\"*" + csharp + (rx + (seq + (or bos + (not (any "\""))) + (zero-or-more "\"")))) + +(c-lang-defconst c-type-prefix-kwds + csharp '("class" "interface" "struct")) + +(c-lang-defconst c-class-decl-kwds + csharp '("class" "interface" "struct")) + +;;; Keyword lists + +(c-lang-defconst c-primitive-type-kwds + csharp '("bool" "byte" "sbyte" "char" "decimal" "double" "float" "int" "uint" + "long" "ulong" "short" "ushort" "void" "object" "string" "var")) + +(c-lang-defconst c-other-decl-kwds + csharp nil) + +(c-lang-defconst c-type-list-kwds + csharp nil) + +(c-lang-defconst c-other-block-decl-kwds + csharp nil) + +(c-lang-defconst c-return-kwds + csharp '("return")) + +(c-lang-defconst c-typedef-kwds + csharp nil) + +(c-lang-defconst c-typeof-kwds + csharp '("typeof" "is" "as")) + +(c-lang-defconst c-type-modifier-prefix-kwds + csharp '("volatile")) + +(c-lang-defconst c-type-modifier-kwds + csharp '("readonly" "new")) + +(c-lang-defconst c-brace-list-decl-kwds + csharp '("enum" "new")) + +(c-lang-defconst c-recognize-post-brace-list-type-p + csharp t) + +(c-lang-defconst c-ref-list-kwds + csharp nil) + +(c-lang-defconst c-using-kwds + csharp '("using")) + +(c-lang-defconst c-equals-type-clause-kwds + csharp '("using")) + +(defun csharp-at-vsemi-p (&optional pos) + (if pos (goto-char pos)) + (save-excursion + (beginning-of-line) + (c-forward-syntactic-ws) + (looking-at "using\\s *("))) + +(c-lang-defconst c-at-vsemi-p-fn + csharp 'csharp-at-vsemi-p) + +(defun csharp-vsemi-status-unknown () t) + +(c-lang-defconst c-vsemi-status-unknown-p-fn + csharp 'csharp-vsemi-status-unknown-p) + + +(c-lang-defconst c-modifier-kwds + csharp '("abstract" "default" "final" "native" "private" "protected" + "public" "partial" "internal" "readonly" "static" "event" "transient" + "volatile" "sealed" "ref" "out" "virtual" "implicit" "explicit" + "fixed" "override" "params" "async" "await" "extern" "unsafe" + "get" "set" "this" "const" "delegate")) + +(c-lang-defconst c-other-kwds + csharp '("select" "from" "where" "join" "in" "on" "equals" "into" + "orderby" "ascending" "descending" "group" "when" + "let" "by" "namespace")) + +(c-lang-defconst c-colon-type-list-kwds + csharp '("class" "struct" "interface")) + +(c-lang-defconst c-block-stmt-1-kwds + csharp '("do" "else" "finally" "try")) + +(c-lang-defconst c-block-stmt-1-2-kwds + csharp '("try")) + +(c-lang-defconst c-block-stmt-2-kwds + csharp '("for" "if" "switch" "while" "catch" "foreach" "fixed" "checked" + "unchecked" "using" "lock")) + +(c-lang-defconst c-simple-stmt-kwds + csharp '("break" "continue" "goto" "throw" "return" "yield")) + +(c-lang-defconst c-constant-kwds + csharp '("true" "false" "null" "value")) + +(c-lang-defconst c-primary-expr-kwds + csharp '("this" "base" "operator")) + +(c-lang-defconst c-inexpr-class-kwds + csharp nil) + +(c-lang-defconst c-class-decl-kwds + csharp '("class" "struct" "interface")) + +(c-lang-defconst c-std-abbrev-keywords + csharp (append (c-lang-const c-std-abbrev-keywords) '("catch" "finally"))) + +(c-lang-defconst c-decl-prefix-re + csharp "\\([{}(;,<]+\\)") + +(c-lang-defconst c-recognize-typeless-decls + csharp t) + +(c-lang-defconst c-recognize-<>-arglists + csharp t) + +(c-lang-defconst c-opt-cpp-prefix + csharp "\\s *#\\s *") + +(c-lang-defconst c-opt-cpp-macro-define + csharp (if (c-lang-const c-opt-cpp-prefix) + "define")) + +(c-lang-defconst c-cpp-message-directives + csharp '("error" "warning" "region")) + +(c-lang-defconst c-cpp-expr-directives + csharp '("if" "elif")) + +(c-lang-defconst c-other-op-syntax-tokens + csharp (append '("#") + (c-lang-const c-other-op-syntax-tokens))) + +(c-lang-defconst c-line-comment-starter + csharp "//") + +(c-lang-defconst c-doc-comment-start-regexp + csharp "///") + +(c-add-style "csharp" + '("java" + (c-basic-offset . 4) + (c-comment-only-line-offset . (0 . 0)) + (c-offsets-alist . ((inline-open . 0) + (arglist-intro . +) + (arglist-close . 0) + (inexpr-class . 0) + (case-label . +) + (cpp-macro . c-lineup-dont-change) + (substatement-open . 0))))) + +(eval-and-compile + (unless (or (stringp c-default-style) + (assoc 'csharp-mode c-default-style)) + (setq c-default-style + (cons '(csharp-mode . "csharp") + c-default-style)))) + +(defun csharp--color-forwards (font-lock-face) + (let (id-beginning) + (goto-char (match-beginning 0)) + (forward-word) + (while (and (not (or (eq (char-after) ?\;) + (eq (char-after) ?\{))) + (progn + (forward-char) + (c-forward-syntactic-ws) + (setq id-beginning (point)) + (> (skip-chars-forward + (c-lang-const c-symbol-chars)) + 0)) + (not (get-text-property (point) 'face))) + (c-put-font-lock-face id-beginning (point) font-lock-face) + (c-forward-syntactic-ws)))) + +(c-lang-defconst c-basic-matchers-before + csharp `( + ;; Warning face on unclosed strings + ,@(if (version< emacs-version "27.0") + ;; Taken from 26.1 branch + `(,(c-make-font-lock-search-function + (concat ".\\(" c-string-limit-regexp "\\)") + '((c-font-lock-invalid-string)))) + `(("\\s|" 0 font-lock-warning-face t nil))) + + ;; Invalid single quotes + c-font-lock-invalid-single-quotes + + ;; Keyword constants + ,@(when (c-lang-const c-constant-kwds) + (let ((re (c-make-keywords-re nil (c-lang-const c-constant-kwds)))) + `((eval . (list ,(concat "\\<\\(" re "\\)\\>") + 1 c-constant-face-name))))) + + ;; Keywords except the primitive types. + ,`(,(concat "\\<" (c-lang-const c-regular-keywords-regexp)) + 1 font-lock-keyword-face) + + ;; Chained identifiers in using/namespace statements + ,`(,(c-make-font-lock-search-function + csharp--regex-using-or-namespace + `((csharp--color-forwards font-lock-variable-name-face) + nil + (goto-char (match-end 0))))) + + + ;; Negation character + (eval . (list "\\(!\\)[^=]" 1 c-negation-char-face-name)) + + ;; Types after 'new' + (eval . (list (concat "\\<new\\> *" csharp--regex-type-name-matcher) + 1 font-lock-type-face)) + + ;; Single identifier in attribute + (eval . (list (concat "\\[" csharp--regex-type-name-matcher "\\][^;]") + 1 font-lock-variable-name-face t)) + + ;; Function names + (eval . (list "\\([A-Za-z0-9_]+\\)\\(<[a-zA-Z0-9, ]+>\\)?(" + 1 font-lock-function-name-face)) + + ;; Nameof + (eval . (list (concat "\\(\\<nameof\\>\\) *(") + 1 font-lock-function-name-face)) + + (eval . (list (concat "\\<nameof\\> *( *" + csharp--regex-identifier-matcher + " *) *") + 1 font-lock-variable-name-face)) + + ;; Catch statements with type only + (eval . (list (concat "\\<catch\\> *( *" + csharp--regex-type-name-matcher + " *) *") + 1 font-lock-type-face)) + )) + +(c-lang-defconst c-basic-matchers-after + csharp (append + ;; Merge with cc-mode defaults - enables us to add more later + (c-lang-const c-basic-matchers-after))) + +(defcustom csharp-codedoc-tag-face 'c-doc-markup-face-name + "Face to be used on the codedoc docstring tags. + +Should be one of the font lock faces, such as +`font-lock-variable-name-face' and friends. + +Needs to be set before `csharp-mode' is loaded, because of +compilation and evaluation time conflicts." + :type 'symbol) + +(defcustom csharp-font-lock-extra-types + (list csharp--regex-type-name) + (c-make-font-lock-extra-types-blurb "C#" "csharp-mode" (concat)) + :type 'c-extra-types-widget + :group 'c) + +(defconst csharp-font-lock-keywords-1 (c-lang-const c-matchers-1 csharp) + "Minimal font locking for C# mode.") + +(defconst csharp-font-lock-keywords-2 (c-lang-const c-matchers-2 csharp) + "Fast normal font locking for C# mode.") + +(defconst csharp-font-lock-keywords-3 (c-lang-const c-matchers-3 csharp) + "Accurate normal font locking for C# mode.") + +(defvar csharp-font-lock-keywords csharp-font-lock-keywords-3 + "Default expressions to highlight in C# mode.") + +(defun csharp-font-lock-keywords-2 () + (c-compose-keywords-list csharp-font-lock-keywords-2)) +(defun csharp-font-lock-keywords-3 () + (c-compose-keywords-list csharp-font-lock-keywords-3)) +(defun csharp-font-lock-keywords () + (c-compose-keywords-list csharp-font-lock-keywords)) + +;;; Doc comments + +(defconst codedoc-font-lock-doc-comments + ;; Most of this is taken from the javadoc example, however, we don't use the + ;; '@foo' syntax, so I removed that. Supports the XML tags only + `((,(concat "</?\\sw" ; XML tags. + "\\(" + (concat "\\sw\\|\\s \\|[=\n\r*.:]\\|" + "\"[^\"]*\"\\|'[^']*'") + "\\)*/?>") + 0 ,csharp-codedoc-tag-face prepend nil) + ;; ("\\([a-zA-Z0-9_]+\\)=" 0 font-lock-variable-name-face prepend nil) + ;; ("\".*\"" 0 font-lock-string-face prepend nil) + ("&\\(\\sw\\|[.:]\\)+;" ; XML entities. + 0 ,csharp-codedoc-tag-face prepend nil))) + +(defconst codedoc-font-lock-keywords + `((,(lambda (limit) + (c-font-lock-doc-comments "///" limit + codedoc-font-lock-doc-comments))))) + +;;; End of doc comments + +;;; Adding syntax constructs + +(advice-add 'c-looking-at-inexpr-block + :around #'csharp-looking-at-inexpr-block) + +(defun csharp-looking-at-inexpr-block (orig-fun &rest args) + (let ((res (csharp-at-lambda-header))) + (if res + res + (apply orig-fun args)))) + +(defun csharp-at-lambda-header () + (save-excursion + (c-backward-syntactic-ws) + (unless (bobp) + (backward-char) + (c-safe (goto-char (scan-sexps (point) -1))) + (when (or (looking-at "([[:alnum:][:space:]_,]*)[ \t\n]*=>[ \t\n]*{") + (looking-at "[[:alnum:]_]+[ \t\n]*=>[ \t\n]*{")) + ;; If we are at a C# lambda header + (cons 'inexpr (point)))))) + +(advice-add 'c-guess-basic-syntax + :around #'csharp-guess-basic-syntax) + +(defun csharp-guess-basic-syntax (orig-fun &rest args) + (cond + (;; Attributes + (save-excursion + (goto-char (c-point 'iopl)) + (and + (eq (char-after) ?\[) + (save-excursion + (c-go-list-forward) + (and (eq (char-before) ?\]) + (not (eq (char-after) ?\;)))))) + `((annotation-top-cont ,(c-point 'iopl)))) + + ((and + ;; Heuristics to find object initializers + (save-excursion + ;; Next non-whitespace character should be '{' + (goto-char (c-point 'boi)) + (eq (char-after) ?{)) + (save-excursion + ;; 'new' should be part of the line + (goto-char (c-point 'iopl)) + (looking-at ".*\\s *new\\s *.*")) + ;; Line should not already be terminated + (save-excursion + (goto-char (c-point 'eopl)) + (or (not (eq (char-before) ?\;)) + (not (eq (char-before) ?\{))))) + (if (save-excursion + ;; if we have a hanging brace on line before + (goto-char (c-point 'eopl)) + (eq (char-before) ?\{)) + `((brace-list-intro ,(c-point 'iopl))) + `((block-open) (statement ,(c-point 'iopl))))) + (t + (apply orig-fun args)))) + +;;; End of new syntax constructs + + + +;;; Fix for strings on version 27.1 + +(when (version= emacs-version "27.1") + ;; See: + ;; https://github.com/emacs-csharp/csharp-mode/issues/175 + ;; https://github.com/emacs-csharp/csharp-mode/issues/151 + ;; for the full story. + (defun c-pps-to-string-delim (end) + (let* ((start (point)) + (no-st-s `(0 nil nil ?\" nil nil 0 nil ,start nil nil)) + (st-s `(0 nil nil t nil nil 0 nil ,start nil nil)) + no-st-pos st-pos + ) + (parse-partial-sexp start end nil nil no-st-s 'syntax-table) + (setq no-st-pos (point)) + (goto-char start) + (while (progn + (parse-partial-sexp (point) end nil nil st-s 'syntax-table) + (unless (bobp) + (c-clear-syn-tab (1- (point)))) + (setq st-pos (point)) + (and (< (point) end) + (not (eq (char-before) ?\"))))) + (goto-char (min no-st-pos st-pos)) + nil)) + + (defun c-multiline-string-check-final-quote () + (let (pos-ll pos-lt) + (save-excursion + (goto-char (point-max)) + (skip-chars-backward "^\"") + (while + (and + (not (bobp)) + (cond + ((progn + (setq pos-ll (c-literal-limits) + pos-lt (c-literal-type pos-ll)) + (memq pos-lt '(c c++))) + ;; In a comment. + (goto-char (car pos-ll))) + ((save-excursion + (backward-char) ; over " + (c-is-escaped (point))) + ;; At an escaped string. + (backward-char) + t) + (t + ;; At a significant " + (c-clear-syn-tab (1- (point))) + (setq pos-ll (c-literal-limits) + pos-lt (c-literal-type pos-ll)) + nil))) + (skip-chars-backward "^\"")) + (cond + ((bobp)) + ((eq pos-lt 'string) + (c-put-syn-tab (1- (point)) '(15))) + (t nil)))))) + +;;; End of fix for strings on version 27.1 + + + +(defvar csharp-mode-syntax-table + (funcall (c-lang-const c-make-mode-syntax-table csharp)) + "Syntax table used in csharp-mode buffers.") + +(defvar csharp-mode-map + (let ((map (c-make-inherited-keymap))) + map) + "Keymap used in csharp-mode buffers.") + +(easy-menu-define csharp-mode-menu csharp-mode-map "C# Mode Commands" + (cons "C#" (c-lang-const c-mode-menu csharp))) + +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode)) + +;; Custom variables +;;;###autoload +(define-derived-mode csharp-mode prog-mode "C#" + "Major mode for editing Csharp code. + +Key bindings: +\\{csharp-mode-map}" + :after-hook (c-update-modeline) + (c-initialize-cc-mode t) + (c-init-language-vars csharp-mode) + (c-common-init 'csharp-mode) + (setq-local c-doc-comment-style '((csharp-mode . codedoc))) + (run-mode-hooks 'c-mode-common-hook)) + +(provide 'csharp-mode) + +;;; csharp-mode.el ends here diff --git a/elpa/csharp-mode-1.1.1/csharp-tree-sitter.el b/elpa/csharp-mode-1.1.1/csharp-tree-sitter.el @@ -0,0 +1,425 @@ +;;; csharp-tree-sitter.el --- tree sitter support for C# -*- lexical-binding: t; -*- + +;; Copyright (C) 2020-2021 Free Software Foundation, Inc. + +;; Author : Theodor Thornhill <theo@thornhill.no> +;; Maintainer : Jostein Kjønigsen <jostein@gmail.com> +;; Theodor Thornhill <theo@thornhill.no> +;; Created : September 2020 +;; Modified : 2020 +;; Version : 1.1.1 +;; Keywords : c# languages oop mode +;; X-URL : https://github.com/emacs-csharp/csharp-mode +;; Package-Requires: ((emacs "26.1") (tree-sitter "0.12.1") (tree-sitter-indent "0.1") (tree-sitter-langs "0.9.1")) + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <http://www.gnu.org/licenses/>. + + +;;; Code: +(require 'cl-lib) +(require 'cl-extra) +(require 'seq) + +(when t + ;; In order for the package to be usable and installable (and hence + ;; compilable) without tree-sitter, wrap the `require's within a dummy `when' + ;; so they're only executed when loading this file but not when compiling it. + (require 'tree-sitter) + (require 'tree-sitter-hl) + (require 'tree-sitter-indent) + (require 'tree-sitter-langs)) +;; Vars and functions defined by the above packages: +(defvar tree-sitter-major-mode-language-alist) ;From `tree-sitter-langs'. +(declare-function tree-sitter-indent-mode "ext:tree-sitter-indent") +(declare-function tree-sitter-indent-line "ext:tree-sitter-indent") +(declare-function tree-sitter-hl-mode "ext:tree-sitter-hl") +(declare-function tsc-node-end-position "ext:tree-sitter") +(declare-function tsc-node-start-position "ext:tree-sitter") +(declare-function tree-sitter-node-at-point "ext:tree-sitter") + +(require 'csharp-compilation) + +(defvar csharp-mode-syntax-table) +(defvar csharp-mode-map) + +;;; Tree-sitter + +(defconst csharp-mode-tree-sitter-patterns + [ ;; Various constructs + (comment) @comment + (modifier) @keyword + (this_expression) @keyword + (escape_sequence) @keyword + + ;; Literals + [(real_literal) (integer_literal)] @number + (null_literal) @constant + (boolean_literal) @constant + [(string_literal) + (verbatim_string_literal) + (interpolated_string_text) + (interpolated_verbatim_string_text) + (character_literal) + "\"" + "$\"" + "@$\"" + "$@\""] @string + + ;; Keywords + ["using" "namespace" "class" "if" "else" "throw" "new" "for" + "return" "await" "struct" "enum" "switch" "case" + "default" "typeof" "try" "catch" "finally" "break" + "foreach" "in" "yield" "get" "set" "when" "as" "out" + "is" "while" "continue" "this" "ref" "goto" "interface" + "from" "where" "select" "lock" "base" "record" "init" + "with" "let" "static" + ] @keyword + + ;; Linq + (from_clause (identifier) @variable) + (group_clause) + (order_by_clause) + (select_clause (identifier) @variable) + (query_continuation (identifier) @variable) @keyword + + ;; Enum + (enum_member_declaration (identifier) @variable) + (enum_declaration (identifier) @type) + + ;; Interface + (interface_declaration + name: (identifier) @type) + + ;; Struct + (struct_declaration (identifier) @type) + + ;; Record + (record_declaration (identifier) @type) + + (with_expression + (with_initializer_expression + (simple_assignment_expression + (identifier) @variable))) + + ;; Namespace + (namespace_declaration + name: (identifier) @type) + + ;; Class + (base_list (identifier) @type) + (property_declaration + (generic_name)) + (property_declaration + type: (nullable_type) @type + name: (identifier) @variable) + (property_declaration + type: (predefined_type) @type + name: (identifier) @variable) + (property_declaration + type: (identifier) @type + name: (identifier) @variable) + (class_declaration + name: (identifier) @type) + (constructor_declaration (identifier) @type) + + ;; Method + (method_declaration (identifier) @type (identifier) @function) + (method_declaration (predefined_type) @type (identifier) @function) + (method_declaration (nullable_type) @type (identifier) @function) + (method_declaration (void_keyword) @type (identifier) @function) + (method_declaration (generic_name) (identifier) @function) + (method_declaration (qualified_name (identifier) @type) (identifier) @function) + + ;; Function + (local_function_statement (identifier) @type (identifier) @function) + (local_function_statement (predefined_type) @type (identifier) @function) + (local_function_statement (nullable_type) @type (identifier) @function) + (local_function_statement (void_keyword) @type (identifier) @function) + (local_function_statement (generic_name) (identifier) @function) + + ;; Lambda + (lambda_expression + (identifier) @variable) + + ;; Parameter + (parameter + type: (qualified_name) @type) + (parameter + type: (identifier) @type + name: (identifier) @variable.parameter) + (parameter (identifier) @variable.parameter) + + ;; Array + (array_rank_specifier (identifier) @variable) + (array_type (identifier) @type) + (array_creation_expression) + + ;; Attribute + (attribute (identifier) @variable (attribute_argument_list)) + (attribute (identifier) @variable) + + ;; Object init + (anonymous_object_creation_expression) + (object_creation_expression (identifier) @type) + (initializer_expression (identifier) @variable) + + ;; Typeof + (type_of_expression (identifier) @variable) + + ;; Member access + (invocation_expression (member_access_expression (generic_name (identifier) @method.call))) + (invocation_expression (member_access_expression (identifier)\? @method.call .)) + (member_access_expression (identifier) @variable) + + ;; Variable + (variable_declaration (identifier) @type) + (variable_declarator (identifier) @variable) + + ;; Equals value + (equals_value_clause (identifier) @variable) + + ;; Return + (return_statement (identifier) @variable) + (yield_statement (identifier) @variable) + + ;; Type + (type_parameter + (identifier) @type) + (type_argument_list + (identifier) @type.argument) + (generic_name + (identifier) @type) + (implicit_type) @type + (predefined_type) @type + (nullable_type) @type + ["operator"] @type + + ;; Type constraints + (type_parameter_constraints_clause + (identifier) @type) + ;; (type_parameter_constraint + ;; (identifier) @type) ;; causes parsing error in tree-sitter + (type_constraint + (identifier) @type) + + ;; Exprs + (binary_expression (identifier) @variable (identifier) @variable) + (binary_expression (identifier)* @variable) + (conditional_expression (identifier) @variable) + ;; (prefix_unary_expression (identifier)* @variable) ;; crashes tree-sitter c-code with SIGABRT + (postfix_unary_expression (identifier)* @variable) + (assignment_expression (identifier) @variable) + (cast_expression (identifier) @type) + + ;; Preprocessor + (preprocessor_directive) @constant + (preprocessor_call (identifier) @string) + + ;; Loop + (for_each_statement (implicit_type) @type (identifier) @variable) + (for_each_statement (predefined_type) @type (identifier) @variable) + (for_each_statement (identifier) @type (identifier) @variable) + + ;; Exception + (catch_declaration (identifier) @type (identifier) @variable) + (catch_declaration (identifier) @type) + + ;; Switch + (switch_statement (identifier) @variable) + (switch_expression (identifier) @variable) + + ;; If + (if_statement (identifier) @variable) + + ;; Declaration expression + (declaration_expression (implicit_type) (identifier) @variable) + + ;; Arrow expression + (arrow_expression_clause (identifier) @variable) + + ;; Lock statement + (lock_statement (identifier) @variable) + + ;; Other + ;; (argument_list + ;; (identifier) @variable) ;; causes parsing error in tree-sitter + (label_name) @variable + (using_directive (identifier) @type.parameter) + (using_directive (qualified_name) @type.parameter) + (using_directive (name_equals (identifier) @type.parameter)) + ;; (await_expression (identifier)* @function) ;; crashes tree-sitter c-code with sigabrt! + (invocation_expression (identifier) @function) + (element_access_expression (identifier) @variable) + (conditional_access_expression (identifier) @variable) + (member_binding_expression (identifier) @variable) + (name_colon (identifier)* @variable.special) + (field_declaration) + (argument (identifier) @variable) + + ;; Catch-alls + (identifier) @variable + + ;; Interpolation + ;; (interpolated_string_expression) @string + ] + ) + +;;; Tree-sitter indentation + +(defgroup csharp-mode-indent nil "Indent lines using Tree-sitter as backend" + :group 'tree-sitter) + +(defcustom csharp-tree-sitter-indent-offset 4 + "Indent offset for csharp-tree-sitter-mode." + :type 'integer + :group 'csharp) + +(defvar tree-sitter-indent-csharp-tree-sitter-scopes + '((indent-all + ;; these nodes are always indented + . (accessor_declaration + break_statement + arrow_expression_clause + parameter_list + conditional_expression + constructor_initializer + argument_list + ".")) + (indent-rest + ;; if parent node is one of these and node is not first → indent + . (binary_expression + switch_section)) + (indent-body + ;; if parent node is one of these and current node is in middle → indent + . (enum_member_declaration_list + base_list + block + anonymous_object_creation_expression + initializer_expression + expression_statement + declaration_list + attribute_argument_list + switch_body + switch_expression)) + (paren-indent + ;; if parent node is one of these → indent to paren opener + . (parenthesized_expression)) + (align-char-to + ;; chaining char → node types we move parentwise to find the first chaining char + . ()) + (aligned-siblings + ;; siblings (nodes with same parent) should be aligned to the first child + . (parameter + argument)) + (multi-line-text + ;; if node is one of these, then don't modify the indent + ;; this is basically a peaceful way out by saying "this looks like something + ;; that cannot be indented using AST, so best I leave it as-is" + . (preprocessor_call + labeled_statement)) + (outdent + ;; these nodes always outdent (1 shift in opposite direction) + . (case_switch_label)) + (align-to-node-line + ;; this group has lists of alist (node type . (node types... )) + ;; we move parentwise, searching for one of the node + ;; types associated with the key node type. if found, + ;; align key node with line where the ancestor node + ;; was found. + . ((block . (lambda_expression))))) + "Scopes for indenting in C#.") + +;;; tree-sitter helper-functions. navigation, editing, etc. +;;; may be subject to future upstreaming-effort + +(defun csharp-beginning-of-defun () + "Replacement-function for `beginning-of-defun' for `csharp-tree-sitter-mode'." + (interactive) + (when-let ((declaration + (cl-some (lambda (decl) + (tree-sitter-node-at-point decl)) + '(method_declaration + constructor_declaration + class_declaration + namespace_declaration)))) + (goto-char (tsc-node-start-position declaration)))) + +(defun csharp-end-of-defun () + "Replacement-function for `end-of-defun' for `csharp-tree-sitter-mode'." + (interactive) + (when-let ((declaration + (cl-some (lambda (decl) + (tree-sitter-node-at-point decl)) + '(method_declaration + constructor_declaration + class_declaration + namespace_declaration)))) + (goto-char (tsc-node-end-position declaration)))) + +(defun csharp-delete-method-at-point () + "Deletes the method at point." + (interactive) + (when-let ((method (tree-sitter-node-at-point 'method_declaration))) + (delete-region (tsc-node-start-position method) + (tsc-node-end-position method)))) + +(defun csharp-change-string-at-point () + "Change string at point." + (interactive) + (when-let ((method (tree-sitter-node-at-point 'string_literal))) + (delete-region (1+ (tsc-node-start-position method)) + (1- (tsc-node-end-position method))))) + +;;; end tree-sitter helper-functions. + +(defvar csharp-tree-sitter-mode-map + (let ((map (make-sparse-keymap))) + map) + "Keymap used in csharp-mode buffers.") + +(defvar csharp-tree-sitter-mode-syntax-table + (let ((table (make-syntax-table))) + (modify-syntax-entry ?@ "_" table) + table)) + +;;;###autoload +(define-derived-mode csharp-tree-sitter-mode prog-mode "C#" + "Major mode for editing Csharp code. + +Key bindings: +\\{csharp-tree-sitter-mode-map}" + :group 'csharp + :syntax-table csharp-tree-sitter-mode-syntax-table + + (setq-local indent-line-function #'tree-sitter-indent-line) + (setq-local beginning-of-defun-function #'csharp-beginning-of-defun) + (setq-local end-of-defun-function #'csharp-end-of-defun) + + ;; https://github.com/ubolonton/emacs-tree-sitter/issues/84 + (unless font-lock-defaults + (setq font-lock-defaults '(nil))) + (setq-local tree-sitter-hl-default-patterns csharp-mode-tree-sitter-patterns) + ;; Comments + (setq-local comment-start "// ") + (setq-local comment-start-skip "\\(?://+\\|/\\*+\\)\\s *") + (setq-local comment-end "") + + (tree-sitter-hl-mode) + (tree-sitter-indent-mode)) + +(add-to-list 'tree-sitter-major-mode-language-alist '(csharp-tree-sitter-mode . c-sharp)) + +(provide 'csharp-tree-sitter) + +;;; csharp-tree-sitter.el ends here diff --git a/elpa/csharp-mode-1.1.1/makefile b/elpa/csharp-mode-1.1.1/makefile @@ -0,0 +1,24 @@ +EMACS ?= emacs +CASK ?= cask + +TESTHOME=/tmp/emacs + +package: build + $(CASK) package + +build: test + $(CASK) build + +test: + @echo "Testing..." + @$(CASK) $(EMACS) -Q -batch -L . -l csharp-mode-tests.el -f ert-run-tests-batch-and-exit + +clean: + $(CASK) clean-elc + rm -rf dist + rm -rf $(TESTHOME) + +check-defuns: + grep "^(defun " csharp-mode.el | sed -r "s/\(defun ([a-z0-9-]+) .*$$/\1/" | sort >/tmp/defuns.txt + for line in `cat /tmp/defuns.txt` ; do echo -n "$$line: " ; grep "$$line" csharp-mode.el | grep -v defun | wc -l ; done >/tmp/use-count.txt + grep " 0" /tmp/use-count.txt diff --git a/elpa/csharp-mode-1.1.1/test-files/devenv-error.txt b/elpa/csharp-mode-1.1.1/test-files/devenv-error.txt @@ -0,0 +1,25 @@ +-- mode: compilation; default-directory: "~/" -- +Compilation started at Mon Jul 13 14:26:40 + +"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.com" C:\working_chad\dev_grep\build_grep_database\build_grep_database.sln /build Debug + +Microsoft (R) Microsoft Visual Studio 2012 Version 11.0.61030.0. +Copyright (C) Microsoft Corp. All rights reserved. +1>------ Build started: Project: build_grep_database, Configuration: Release Win32 ------ +1>Build started 7/13/2015 2:26:41 PM. +1>InitializeBuildStatus: +1> Creating "Release\build_grep_database.unsuccessfulbuild" because "AlwaysCreate" was specified. +1>ClCompile: +1> All outputs are up-to-date. +1> DatabaseConnection.cpp +1>c:\working_chad\dev_grep\build_grep_database\databaseconnection.cpp(18): error C2059: syntax error : 'bad suffix on number' +1>c:\working_chad\dev_grep\build_grep_database\databaseconnection.cpp(18): error C2146: syntax error : missing ';' before identifier 'dsfsdf' +1>c:\working_chad\dev_grep\build_grep_database\databaseconnection.cpp(18): error C2065: 'dsfsdf' : undeclared identifier +1>c:\working_chad\dev_grep\build_grep_database\databaseconnection.cpp(97): warning C4244: 'return' : conversion from 'my_ulonglong' to 'long', possible loss of data +1> +1>Build FAILED. +1> +1>Time Elapsed 00:00:00.77 +========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== + +Compilation exited abnormally with code 1 at Mon Jul 13 14:26:42 diff --git a/elpa/csharp-mode-1.1.1/test-files/devenv-mixed-error.txt b/elpa/csharp-mode-1.1.1/test-files/devenv-mixed-error.txt @@ -0,0 +1,39 @@ +-*- mode: compilation; default-directory: "~/" -*- +Compilation started at Mon Jul 13 16:25:02 + +"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.com" +C:\inservice\SystemTesting\SystemTesting.sln /build Debug + +Microsoft (R) Microsoft Visual Studio 2012 Version 11.0.61030.0. +Copyright (C) Microsoft Corp. All rights reserved. +1>------ Build started: Project: OperateDevice_Proxy, Configuration: Debug x86 ------ +2>------ Build started: Project: OperationsProxy, Configuration: Debug Win32 ------ +2>Build started 7/13/2015 4:25:05 PM. +2>InitializeBuildStatus: +2> Touching ".\Debug\OperationsProxy.unsuccessfulbuild". +2>ClCompile: +2> OperationsProxy.cpp +1>Build started 7/13/2015 4:25:05 PM. +1>GenerateTargetFrameworkMonikerAttribute: +1>Skipping target "GenerateTargetFrameworkMonikerAttribute" because all +output files are up-to-date with respect to the input files. +1>CoreCompile: +1> C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /platform:x86 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /errorendlocation /preferreduilang:en-US /highentropyva+ /reference:C:\cad\bin\CADBase.dll /reference:C:\cad\bin\CADCore.dll /reference:C:\cad\bin\IPSProvider.dll /reference:C:\cad\bin\IPSUtil.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:C:\cad\bin\PacketTypes.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\x86\Debug\OperateDevice_Proxy.exe /subsystemversion:6.00 /target:exe /utf8output Program.cs Properties\AssemblyInfo.cs RegistryUtil.cs "C:\Users\cmcalkin\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs" obj\x86\Debug\\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs obj\x86\Debug\\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs obj\x86\Debug\\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs +1>C:\inservice\SystemTesting\OperateDeviceProxy\OperateDevice_Proxy\Program.cs(101,9,101,17): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement +1>C:\inservice\SystemTesting\OperateDeviceProxy\OperateDevice_Proxy\Program.cs(101,9,101,10): error CS0012: The type 'System.Data.Entity.Core.Objects.DataClasses.EntityObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. +1>C:\inservice\SystemTesting\OperateDeviceProxy\OperateDevice_Proxy\Program.cs(101,11,101,17): error CS1061: 'int' does not contain a definition for 'sfddsf' and no extension method 'sfddsf' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?) +1>C:\inservice\SystemTesting\OperateDeviceProxy\OperateDevice_Proxy\Program.cs(321,30,321,31): warning CS0168: The variable 'e' is declared but never used +1> +1>Build FAILED. +1> +1>Time Elapsed 00:00:00.28 +2>c:\inservice\systemtesting\operationsproxy\operationsproxy.cpp(54): error C2059: syntax error : 'bad suffix on number' +2>c:\inservice\systemtesting\operationsproxy\operationsproxy.cpp(54): error C2146: syntax error : missing ';' before identifier 'sdfsdf' +2>c:\inservice\systemtesting\operationsproxy\operationsproxy.cpp(54): error C2065: 'sdfsdf' : undeclared identifier +2> +2>Build FAILED. +2> +2>Time Elapsed 00:00:02.49 +========== Build: 0 succeeded, 2 failed, 15 up-to-date, 0 skipped ========== + +Compilation exited abnormally with code 1 at Mon Jul 13 16:25:08 diff --git a/elpa/csharp-mode-1.1.1/test-files/dotnet-nuget-error.txt b/elpa/csharp-mode-1.1.1/test-files/dotnet-nuget-error.txt @@ -0,0 +1 @@ +/home/jostein/build/sample-app/sample-app.csproj : error NU1102: - Found 24 version(s) in Net5 [ Nearest version: 5.0.0-rc.2.20513.86 ] [/home/jostein/build/sample-app/sample-app.sln] diff --git a/elpa/csharp-mode-1.1.1/test-files/dotnet-nuget-warning.txt b/elpa/csharp-mode-1.1.1/test-files/dotnet-nuget-warning.txt @@ -0,0 +1 @@ +/home/jostein/build/sample-app/sample-app.csproj : warning NU1604: Project dependency JetBrains.Annotations does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results. diff --git a/elpa/csharp-mode-1.1.1/test-files/dotnet-test-fail-xunit.txt b/elpa/csharp-mode-1.1.1/test-files/dotnet-test-fail-xunit.txt @@ -0,0 +1,8 @@ +[xUnit.net 00:00:00.60] SampleApp.Module.Tests.TestClass.Some_Testcase_Gone_Wrong [FAIL] + X SampleApp.Module.Tests.TestClass.Some_Testcase_Gone_Wrong [2ms] + Error Message: + System.NotImplementedException : The method or operation is not implemented. + Stack Trace: + at SampleApp.Module.Testee..ctor(IHttpClient httpClient) in /home/jostein/build/sample-app/Module/Testee.cs:line 24 + at SampleApp.Module.Tests.TestClass.Some_Testcase_Gone_Wrong() in /home/jostein/build/sample-app/tests/TestClass.cs:line 11 + diff --git a/elpa/csharp-mode-1.1.1/test-files/fontification-test-compiler-directives-with-comments.cs b/elpa/csharp-mode-1.1.1/test-files/fontification-test-compiler-directives-with-comments.cs @@ -0,0 +1,5 @@ +#region case 1 + +// this is a comment +#region case 2 + diff --git a/elpa/csharp-mode-1.1.1/test-files/fontification-test-compiler-directives.cs b/elpa/csharp-mode-1.1.1/test-files/fontification-test-compiler-directives.cs @@ -0,0 +1,23 @@ +using System; + +public class Test +{ + public void Test() + { + string x; + + // reference + x += "strReference"; + #region v1 verification + x += "strVerification"; + #endregion + + #region t1 test' + x += "singleQuote"; + #endregion + + #region t2 - test" + x += "doubleQuote"; + #endregion + } +} diff --git a/elpa/csharp-mode-1.1.1/test-files/fontification-test.cs b/elpa/csharp-mode-1.1.1/test-files/fontification-test.cs @@ -0,0 +1,6 @@ + +public const string Literal1 = @"literal without trailing slash"; +public const bool1 Reference = true; +public const bool2 Reference = true; +public static const string Literal3 = @"multi-line +literal"; diff --git a/elpa/csharp-mode-1.1.1/test-files/imenu-comment-test.cs b/elpa/csharp-mode-1.1.1/test-files/imenu-comment-test.cs @@ -0,0 +1,16 @@ +using System; + +public class MyClass +{ + public void HasComment() // test + { + } + + public void HasNoComment() + { + } + + public void CommentedToo() /* test yes */ + { + } +} diff --git a/elpa/csharp-mode-1.1.1/test-files/imenu-delegate-test.cs b/elpa/csharp-mode-1.1.1/test-files/imenu-delegate-test.cs @@ -0,0 +1,12 @@ +using System; + +public delegate void PromptCallback( Mobile from, string text ); +public delegate void PromptStateCallback( Mobile from, string text, object state ); +public delegate void PromptStateCallback<T>( Mobile from, string text, T state ); + +namespace Foobar +{ + public delegate void TargetCallback( Mobile from, object targeted ); + public delegate void TargetStateCallback( Mobile from, object targeted, object state ); + public delegate void TargetStateCallback<T>( Mobile from, object targeted, T state ); +} diff --git a/elpa/csharp-mode-1.1.1/test-files/imenu-field-keyword-test.cs b/elpa/csharp-mode-1.1.1/test-files/imenu-field-keyword-test.cs @@ -0,0 +1,19 @@ +using System; + +/// <summary> +/// This class is designed to support a test-case for imenu indexing +/// of a class' member fields. +/// </summary> +public class FieldTestClass +{ + public bool TestBool; + + private string CommentedField; // this is a comment + + private static int _MultiLineComment; /* + new line */ + + internal volatile DateTime VolatileTest; + + private static object m_Member; +} diff --git a/elpa/csharp-mode-1.1.1/test-files/imenu-generics-test.cs b/elpa/csharp-mode-1.1.1/test-files/imenu-generics-test.cs @@ -0,0 +1,19 @@ +using System; + +class ImenuMatcherTests +{ + private void OneGeneric<T>(this IAppBuilder builder, params object[] args) + { + Console.WriteLine("TODO: something"); + } + + private void TwoGeneric<T1,T2>(this IAppBuilder builder, params object[] args) + { + Console.WriteLine("TODO: something"); + } + + private void NoGeneric(this IAppBuilder builder, params object[] args) + { + Console.WriteLine("TODO: something"); + } +} diff --git a/elpa/csharp-mode-1.1.1/test-files/imenu-interface-property-test.cs b/elpa/csharp-mode-1.1.1/test-files/imenu-interface-property-test.cs @@ -0,0 +1,24 @@ +using System; + +public interface IImenuTest +{ + string InterfaceString { get; } +} + +/// <summary> +/// This test-case checks whether imenu indexes member declarations +/// with no access-modifier, but instead with the explicit +/// interface-name prefixed. +/// +/// We expect both the method and property to show up in our index, +/// with interface-name included. +/// </summary> +public class ImenuTest : IImenuTest +{ + string IImenuTest.InterfaceString { get { return "i"; }} + + string IImenuTest.MethodName(string param1, int param2) + { + + } +} diff --git a/elpa/csharp-mode-1.1.1/test-files/imenu-method-test.cs b/elpa/csharp-mode-1.1.1/test-files/imenu-method-test.cs @@ -0,0 +1,51 @@ +using System; + + +/// <summary> +/// This class is used to test implementation of method-indexing. +/// </summary> +public class MethodTest +{ + [DllImport("user32.dll")] + public extern int GetTickCount64(); + + public async string OpenWebServiceAsync(string url) + { + await foo; + } + + // Failing test: methods with new-modifier + // public new string ShouldStillBeMethod() + public string ToString() + { + + } + + public virtual override bool Equals(object other) + { + + } + + public T GenericMethod1<T>(T instance, string item) + { + + } + + public T1 GenericMethod2<T1,T2>(T1 instance, T2 item) + { + + } + + private Dictionary<string,Func<int, bool>> NestedGeneric() + { + + } + + public abstract string AbstractMethod(); + + public unsafe static void UnsafeCopy(byte[] src, byte[] dst, int count) + { + + } + +} diff --git a/elpa/csharp-mode-1.1.1/test-files/imenu-namespace-test.cs b/elpa/csharp-mode-1.1.1/test-files/imenu-namespace-test.cs @@ -0,0 +1,16 @@ +using System; + +namespace ImenuTest +{ + public interface ImenuTestInterface + { + } + + public class ImenuTestClass + { + } + + public enum ImenuTestEnum + { + } +} diff --git a/elpa/csharp-mode-1.1.1/test-files/indentation-tests.cs b/elpa/csharp-mode-1.1.1/test-files/indentation-tests.cs @@ -0,0 +1,257 @@ +using System; + +/* comment block + on namespace test */ +namespace Boo +{ + // comment on class test + public class Foo + { + // auto-property-test + public bool AutoProperty { get; set; } + + // regular property-test + public bool Property + { + get + { + return true; + } + set + { + // ignored + } + } + + /// <summary> + /// Codedoc on method-test + /// </summary> + public void Foo(string a = "hkfdhkd", string b = "bbbbbb") + { + // OK! + } + + [Fact] + [Test] + public void Test() + { + if (test) + { + + } + + if (test2) { + // should work too + bool b = true; + } + + var x = new { + adhoc = object, + with = new prop(), + }; + + // test-cases for type initializer indetation issue: + // https://github.com/josteink/csharp-mode/issues/95 + var x_gen = new Foo<bar> + { + a, + b, + c + }; + + return new Foo<bar> + { + a, + b, + c + }; + + yield return new Foo<bar> + { + a, + b, + c + }; + + new Foo<Bar> + { + a, + b, + c + }; + + var array1 = new ArrayList + { + 1, 2, 3, 4, 5 + }; + + var array2 = new string[] + { + "a", "b", "c" + }; + + var map = new Dictionary<int,string> { + { 1, "true" }, + { 2, "false" }, + }; + + var map2 = new Dictionary<int,string> + { + { 1, "true" }, + { 2, "false" }, + }; + + var map3 = new Dictionary<string,Func<int, bool>> + { + { "IsZero", (int i) => i == 0 } + }; + + var innerClassIntance = new TypeOuter.TypeInner + { + Boo = "Foo", + May = "Yay" + }; + + // yielding has different behaviour... for some reason! + // https://github.com/josteink/csharp-mode/issues/94 + yield return new InnerA { + PropA = 1, + PropB = 2 + }; + + // yield return new InnerA.InnerB { + // PropA = 1, + // PropB = 2 + // }; + + yield return new InnerA + { + Boo = "Foo", + May = "Yay" + }; + + // yield return new InnerA.InnerB + // { + // Boo = "Foo", + // May = "Yay" + // }; + + // extra test-cases + + new Foo{ + a, + b, + c + }; + + new Foo { + a, + b, + c + }; + + new Foo + { + a, + b, + c + }; + + using (test) + { + System.Console.WriteLine("boo"); + } + + /* Callback indentation test. */ + SomeFunction(() => { + System + .Console + .WriteLine("boo"); + }); + + SomeFunction(() => + { + System + .Console + .WriteLine("boo"); + }); + + SomeFunction((withParam) => { + System + .Console + .WriteLine("boo"); + }); + + SomeFunction((withParam) => + { + System + .Console + .WriteLine("boo"); + }); + } + + public void CaseStamentIndentation() + { + int bar = 0; + switch (foo) + { + case "foo": + bar = 0; + break; + } + switch (bar) + { + case 1: + case 2: + bar = 0; + break; + } + switch (foo) + { + case "foo": + case "bar": + bar = 0; + bar += 1; + break; + } + } + } +} + +public class NestedPreProcessor +{ +#if DEBUG + public static bool Debug = true; +#endif +} + +enum SomeEnum +{ + Item, + Another, + Yeah +} + +enum AnotherEnum +{ + First = 1, + Second = 2, + Third = 3 +} + +public async Task WriteAsync() +{ + using (var memoryStream = new MemoryStream()) + using (var writer = new BinaryWriter()) + { + // double using should indent like this + } + + using (var memoryStream = new MemoryStream()) + { + using (var writer = new BinaryWriter()) + { + // or this + } + } +} diff --git a/elpa/csharp-mode-1.1.1/test-files/msbuild-concurrent-error.txt b/elpa/csharp-mode-1.1.1/test-files/msbuild-concurrent-error.txt @@ -0,0 +1,30 @@ +-*- mode: compilation; default-directory: "~/" -*- +Compilation started at Mon Apr 20 01:44:35 + +bash -c "for m in *akefile; do break; done; if [[ ${m} != \"*akefile\" ]]; then PATH=\"${PATH}:/c/Program Files (x86)/MSBuild/14.0/Bin:/c/Program Files/Emacs/bin\" make; else set -o pipefail; 'c:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe' //m; fi" +Microsoft (R) Build Engine version 14.0.22609.0 +Copyright (C) Microsoft Corporation. All rights reserved. + +Build started 2015-04-20 01:44:36. +The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (60,11)" does not exist in the project, and will be ignored. +The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (108,11)" does not exist in the project, and will be ignored. + 1>Project "c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj" on node 1 (default targets). + 1>GenerateTargetFrameworkMonikerAttribute: + Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. + CoreCompile: + C:\Program Files (x86)\MSBuild\14.0\bin\csc2.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:anycpu32bitpreferred /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ConsoleApplication3.exe /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecommendedRules.ruleset" /subsystemversion:6.00 /target:exe /utf8output Program.cs Properties\AssemblyInfo.cs "C:\Users\ohnob\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs" + 1>Program.cs(13,2): error CS1002: ; expected [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj] + 1>Done Building Project "c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj" (default targets) -- FAILED. + +Build FAILED. + + "c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj" (default target) (1) -> + (CoreCompile target) -> + Program.cs(13,2): error CS1002: ; expected [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj] + + 0 Warning(s) + 1 Error(s) + +Time Elapsed 00:00:00.15 + +Compilation exited abnormally with code 1 at Mon Apr 20 01:44:36 diff --git a/elpa/csharp-mode-1.1.1/test-files/msbuild-concurrent-warning.txt b/elpa/csharp-mode-1.1.1/test-files/msbuild-concurrent-warning.txt @@ -0,0 +1,36 @@ +-*- mode: compilation; -*- +Compilation started at Mon Apr 20 01:44:21 + +bash -c "for m in *akefile; do break; done; if [[ ${m} != \"*akefile\" ]]; then PATH=\"${PATH}:/c/Program Files (x86)/MSBuild/14.0/Bin:/c/Program Files/Emacs/bin\" make; else set -o pipefail; 'c:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe' //m; fi" +Microsoft (R) Build Engine version 14.0.22609.0 +Copyright (C) Microsoft Corporation. All rights reserved. + +Build started 2015-04-20 01:44:22. +The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (60,11)" does not exist in the project, and will be ignored. +The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (108,11)" does not exist in the project, and will be ignored. + 1>Project "c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj" on node 1 (default targets). + 1>GenerateTargetFrameworkMonikerAttribute: + Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. + CoreCompile: + C:\Program Files (x86)\MSBuild\14.0\bin\csc2.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:anycpu32bitpreferred /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ConsoleApplication3.exe /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecommendedRules.ruleset" /subsystemversion:6.00 /target:exe /utf8output Program.cs Properties\AssemblyInfo.cs "C:\Users\ohnob\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs" + 1>Program.cs(13,10): warning CS1030: #warning: 'asdf' [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj] + _CopyAppConfigFile: + Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files. + CopyFilesToOutputDirectory: + Copying file from "obj\Debug\ConsoleApplication3.exe" to "bin\Debug\ConsoleApplication3.exe". + ConsoleApplication3 -> c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\bin\Debug\ConsoleApplication3.exe + Copying file from "obj\Debug\ConsoleApplication3.pdb" to "bin\Debug\ConsoleApplication3.pdb". + 1>Done Building Project "c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj" (default targets). + +Build succeeded. + + "c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj" (default target) (1) -> + (CoreCompile target) -> + Program.cs(13,10): warning CS1030: #warning: 'asdf' [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj] + + 1 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:00.20 + +Compilation finished at Mon Apr 20 01:44:22 diff --git a/elpa/csharp-mode-1.1.1/test-files/msbuild-error.txt b/elpa/csharp-mode-1.1.1/test-files/msbuild-error.txt @@ -0,0 +1,32 @@ +-*- xmode: compilation; default-directory: "~" -*- +Compilation started at Sat Feb 21 10:26:47 + +"C:\Program Files (x86)\MSBuild\12.0\Bin\Msbuild.exe" +Microsoft (R) Build Engine version 12.0.31101.0 +[Microsoft .NET Framework, version 4.0.30319.35312] +Copyright (C) Microsoft Corporation. All rights reserved. + +Build started 2/21/2015 10:26:47 AM. +Project "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj" on node 1 (default targets). +Project "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj" (1) is building "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj" (2) on node 1 (default targets). +GenerateTargetFrameworkMonikerAttribute: +Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. +CoreCompile: + C:\Program Files (x86)\MSBuild\12.0\bin\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ClassLibrary1.dll /subsystemversion:6.00 /target:library /utf8output Class1.cs Folder\Class1.cs Properties\AssemblyInfo.cs "C:\Users\jesse_000\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs" +Folder\Class1.cs(11,12): error CS1002: ; expected [c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj] +Done Building Project "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj" (default targets) -- FAILED. +Done Building Project "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj" (default targets) -- FAILED. + +Build FAILED. + +"c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj" (default target) (1) -> +"c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj" (default target) (2) -> +(CoreCompile target) -> + Folder\Class1.cs(11,12): error CS1002: ; expected [c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj] + + 0 Warning(s) + 1 Error(s) + +Time Elapsed 00:00:00.26 + +Compilation exited abnormally with code 1 at Sat Feb 21 10:26:48 diff --git a/elpa/csharp-mode-1.1.1/test-files/msbuild-square-brackets.txt b/elpa/csharp-mode-1.1.1/test-files/msbuild-square-brackets.txt @@ -0,0 +1,37 @@ +-*- mode: compilation; -*- +Compilation started at Wed May 13 19:21:20 + +bash -c "for m in *akefile; do break; done; if [[ ${m} != \"*akefile\" ]]; then make; else set -o pipefail; 'c:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe' //m; fi" +Microsoft (R) Build Engine version 14.0.22823.1 +Copyright (C) Microsoft Corporation. All rights reserved. + +Build started 2015-05-13 19:21:20. +The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.Net.CoreRuntime.targets (64,11)" does not exist in the project, and will be ignored. +The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (75,11)" does not exist in the project, and will be ignored. +The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (122,11)" does not exist in the project, and will be ignored. + 1>Project "c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ArrayThingError\ArrayThingError\ArrayThingError.csproj" on node 1 (default targets). + 1>GenerateTargetFrameworkMonikerAttribute: + Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. + CoreCompile: + C:\Program Files (x86)\MSBuild\14.0\bin\csc2.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:anycpu32bitpreferred /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Net.Http.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ArrayThingError.exe /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecommendedRules.ruleset" /subsystemversion:6.00 /target:exe /utf8output Program.cs Properties\AssemblyInfo.cs "C:\Users\ohnob\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs" + 1>Properties\AssemblyInfo.cs(40,15): error CS0029: Cannot implicitly convert type 'int' to 'int[]' [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ArrayThingError\ArrayThingError\ArrayThingError.csproj] + 1>Program.cs(13,24): error CS0029: Cannot implicitly convert type 'int' to 'string' [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ArrayThingError\ArrayThingError\ArrayThingError.csproj] + 1>Program.cs(14,26): error CS0029: Cannot implicitly convert type 'string' to 'string[]' [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ArrayThingError\ArrayThingError\ArrayThingError.csproj] + 1>Program.cs(15,28): warning CS0029: Cannot implicitly convert type 'System.Collections.Generic.List<string[]>' to 'string[][]' [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ArrayThingError\ArrayThingError\ArrayThingError.csproj] + 1>Done Building Project "c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ArrayThingError\ArrayThingError\ArrayThingError.csproj" (default targets) -- FAILED. + +Build FAILED. + + "c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ArrayThingError\ArrayThingError\ArrayThingError.csproj" (default target) (1) -> + (CoreCompile target) -> + Properties\AssemblyInfo.cs(40,15): error CS0029: Cannot implicitly convert type 'int' to 'int[]' [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ArrayThingError\ArrayThingError\ArrayThingError.csproj] + Program.cs(13,24): error CS0029: Cannot implicitly convert type 'int' to 'string' [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ArrayThingError\ArrayThingError\ArrayThingError.csproj] + Program.cs(14,26): error CS0029: Cannot implicitly convert type 'string' to 'string[]' [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ArrayThingError\ArrayThingError\ArrayThingError.csproj] + Program.cs(15,28): warning CS0029: Cannot implicitly convert type 'System.Collections.Generic.List<string[]>' to 'string[][]' [c:\Users\ohnob\Documents\Visual Studio 2015\Projects\ArrayThingError\ArrayThingError\ArrayThingError.csproj] + + 0 Warning(s) + 4 Error(s) + +Time Elapsed 00:00:00.23 + +Compilation exited abnormally with code 1 at Wed May 13 19:21:20 diff --git a/elpa/csharp-mode-1.1.1/test-files/msbuild-warning.txt b/elpa/csharp-mode-1.1.1/test-files/msbuild-warning.txt @@ -0,0 +1,58 @@ +-*- xmode: compilation; -*- +Compilation started at Sat Feb 21 10:24:14 + +"C:\Program Files (x86)\MSBuild\12.0\Bin\Msbuild.exe" +Microsoft (R) Build Engine version 12.0.31101.0 +[Microsoft .NET Framework, version 4.0.30319.35312] +Copyright (C) Microsoft Corporation. All rights reserved. + +Build started 2/21/2015 10:24:14 AM. +Project "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj" on node 1 (default targets). +Project "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj" (1) is building "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj" (2) on node 1 (default targets). +GenerateTargetFrameworkMonikerAttribute: +Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. +CoreCompile: + C:\Program Files (x86)\MSBuild\12.0\bin\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ClassLibrary1.dll /subsystemversion:6.00 /target:library /utf8output Class1.cs Folder\Class1.cs Properties\AssemblyInfo.cs "C:\Users\jesse_000\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs" +Class1.cs(11,11): warning CS0169: The field 'ClassLibrary1.Class1.BadImageFormatExcep' is never used [c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj] +Folder\Class1.cs(11,9): warning CS0169: The field 'ClassLibrary1.Folder.Class1.foo' is never used [c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj] +CopyFilesToOutputDirectory: + Copying file from "obj\Debug\ClassLibrary1.dll" to "bin\Debug\ClassLibrary1.dll". + ClassLibrary1 -> c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\bin\Debug\ClassLibrary1.dll + Copying file from "obj\Debug\ClassLibrary1.pdb" to "bin\Debug\ClassLibrary1.pdb". +Done Building Project "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj" (default targets). +GenerateTargetFrameworkMonikerAttribute: +Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. +CoreCompile: + C:\Program Files (x86)\MSBuild\12.0\bin\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:anycpu32bitpreferred /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\bin\Debug\ClassLibrary1.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ConsoleApplication1.exe /subsystemversion:6.00 /target:exe /utf8output Program.cs Properties\AssemblyInfo.cs "C:\Users\jesse_000\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs" +Program.cs(14,11): warning CS0168: The variable 'foo' is declared but never used [c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj] +Program.cs(15,11): warning CS0168: The variable 'sgedf' is declared but never used [c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj] +_CopyFilesMarkedCopyLocal: + Copying file from "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\bin\Debug\ClassLibrary1.dll" to "bin\Debug\ClassLibrary1.dll". + Copying file from "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\bin\Debug\ClassLibrary1.pdb" to "bin\Debug\ClassLibrary1.pdb". +_CopyAppConfigFile: + Copying file from "App.config" to "bin\Debug\ConsoleApplication1.exe.config". +CopyFilesToOutputDirectory: + Copying file from "obj\Debug\ConsoleApplication1.exe" to "bin\Debug\ConsoleApplication1.exe". + ConsoleApplication1 -> c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe + Copying file from "obj\Debug\ConsoleApplication1.pdb" to "bin\Debug\ConsoleApplication1.pdb". +Done Building Project "c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj" (default targets). + +Build succeeded. + +"c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj" (default target) (1) -> +"c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj" (default target) (2) -> +(CoreCompile target) -> + Class1.cs(11,11): warning CS0169: The field 'ClassLibrary1.Class1.BadImageFormatExcep' is never used [c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj] + Folder\Class1.cs(11,9): warning CS0169: The field 'ClassLibrary1.Folder.Class1.foo' is never used [c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ClassLibrary1\ClassLibrary1.csproj] + + +"c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj" (default target) (1) -> + Program.cs(14,11): warning CS0168: The variable 'foo' is declared but never used [c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj] + Program.cs(15,11): warning CS0168: The variable 'sgedf' is declared but never used [c:\Users\jesse_000\Dropbox\barfapp\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj] + + 4 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:00.92 + +Compilation finished at Sat Feb 21 10:24:15 diff --git a/elpa/csharp-mode-1.1.1/test-files/multiline-strings.cs b/elpa/csharp-mode-1.1.1/test-files/multiline-strings.cs @@ -0,0 +1,10 @@ +public const string Literal0 = @"\ +"; +public const string Literal1 = @"\"; +public const string Literal2 = @"\\"; +public const string Literal3 = @"\\\"; +public const string Literal4 = @$"\\\\"; +public const string Literal5 = $@"\\\\ +"; +public const string Literal6 = "\t\t/* We need to ensure that \"{0}\"comes first in this list. */"; +public const string Literal7 = ""; diff --git a/elpa/csharp-mode-1.1.1/test-files/namespace-fontification.cs b/elpa/csharp-mode-1.1.1/test-files/namespace-fontification.cs @@ -0,0 +1,15 @@ +namespace Reference { + +} + +namespace Under_Scored { + +} + +namespace WithNumbers09.Ok { + +} + +namespace WithNumbers09.OkV2 { + +} diff --git a/elpa/csharp-mode-1.1.1/test-files/region-fontification.cs b/elpa/csharp-mode-1.1.1/test-files/region-fontification.cs @@ -0,0 +1,44 @@ +using System; + +public class Test +{ + public void Test() + { + #region fontifies as a region comment + string foo = "bar"; + #endregion + + #region quotes shouldn't mess up a region comment + string foo = "bar"; + #endregion + + #region any number of spaces are allowed before a region comment + string foo = "bar"; + #endregion + + #region a TAB is also allowed before a region comment + string foo = "bar"; + #endregion + + # region a region comment is fine when there are spaces between the # and the region + string foo = "bar"; + # endregion + + # region a TAB between the # and the region doesn't stop this being a region comment either + string foo = "bar"; + # endregion + + #region --- a region comment doesn't have to start with a word --- + string foo = "bar"; + #endregion + + #region "a region comment can even look like this" + string foo = "bar"; + #endregion + + // This is here just to ensure the commentification doesn't bleed to the next line + #region + string foo = "bar"; + #endregion + } +} diff --git a/elpa/csharp-mode-1.1.1/test-files/this-fontification.cs b/elpa/csharp-mode-1.1.1/test-files/this-fontification.cs @@ -0,0 +1,30 @@ +using System; + +namespace DemoSpace +{ + public class DemoClass + { + private InnerClass _innerClass; + + public DemoClass() + { + // note usage of plain "this". + _innerClass = new InnerClass(this); + } + } + + public static class DemoClassExtensions + { + public static bool ExampleWithMemberType(this DemoClass instance, string foo) + { + // fontifies parameters incorrectly + return false; + } + + public static bool ExampleWithBulitInType(this string instance, int bar) + { + // fontifies parameters correctly + return true; + } + } +} diff --git a/elpa/csharp-mode-1.1.1/test-files/using-fontification.cs b/elpa/csharp-mode-1.1.1/test-files/using-fontification.cs @@ -0,0 +1,4 @@ +using Reference; +using Under_scored; +using WithNumbers09.Ok; +using WithNumbers09.OkV2; diff --git a/elpa/csharp-mode-1.1.1/test-files/xbuild-error.txt b/elpa/csharp-mode-1.1.1/test-files/xbuild-error.txt @@ -0,0 +1,47 @@ +-*- xmode: compilation; default-directory: "~/" -*- +Compilation started at Fri Feb 20 22:52:43 + +xbuild /p:GenerateFullPaths=true +XBuild Engine Version 12.0 +Mono, Version 3.12.0.0 +Copyright (C) 2005-2013 Various Mono authors + +Build started 2/20/2015 10:52:44 PM. +__________________________________________________ +Project "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.csproj" (default target(s)): + Target PrepareForBuild: + Configuration: Debug Platform: AnyCPU + Target ResolveProjectReferences: + Project "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/ClassLibrary1.csproj" (default target(s)): + Target PrepareForBuild: + Configuration: Debug Platform: AnyCPU + Target GenerateSatelliteAssemblies: + No input files were specified for target GenerateSatelliteAssemblies, skipping. + Target GenerateTargetFrameworkMonikerAttribute: + Skipping target "GenerateTargetFrameworkMonikerAttribute" because its outputs are up-to-date. + Target CoreCompile: + Tool /Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:full /debug+ /optimize- /out:obj/Debug/ClassLibrary1.dll Class1.cs Folder/Class1.cs Properties/AssemblyInfo.cs /target:library /define:"DEBUG;TRACE" /fullpaths /nostdlib /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Xml.Linq.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Data.DataSetExtensions.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/Microsoft.CSharp.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Data.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Xml.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Core.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/mscorlib.dll /warn:4 +/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Folder/Class1.cs(12): error CS1525: Unexpected symbol `}', expecting `;', `{', `=>', or `where' + Task "Csc" execution -- FAILED + Done building target "CoreCompile" in project "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/ClassLibrary1.csproj".-- FAILED + Done building project "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/ClassLibrary1.csproj".-- FAILED + Task "MSBuild" execution -- FAILED + Done building target "ResolveProjectReferences" in project "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.csproj".-- FAILED +Done building project "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.csproj".-- FAILED + +Build FAILED. +Errors: + +/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.csproj (default targets) -> +/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets (ResolveProjectReferences target) -> +/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/ClassLibrary1.csproj (default targets) -> +/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/xbuild/12.0/bin/Microsoft.CSharp.targets (CoreCompile target) -> + + /Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Folder/Class1.cs(12): error CS1525: Unexpected symbol `}', expecting `;', `{', `=>', or `where' + + 0 Warning(s) + 1 Error(s) + +Time Elapsed 00:00:00.9346550 + +Compilation exited abnormally with code 1 at Fri Feb 20 22:52:45 diff --git a/elpa/csharp-mode-1.1.1/test-files/xbuild-warning.txt b/elpa/csharp-mode-1.1.1/test-files/xbuild-warning.txt @@ -0,0 +1,73 @@ +-*- xmode: compilation; -*- +Compilation started at Fri Feb 20 22:55:05 + +xbuild /p:GenerateFullPaths=true +XBuild Engine Version 12.0 +Mono, Version 3.12.0.0 +Copyright (C) 2005-2013 Various Mono authors + +Build started 2/20/2015 10:55:06 PM. +__________________________________________________ +Project "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.csproj" (default target(s)): + Target PrepareForBuild: + Configuration: Debug Platform: AnyCPU + Target ResolveProjectReferences: + Project "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/ClassLibrary1.csproj" (default target(s)): + Target PrepareForBuild: + Configuration: Debug Platform: AnyCPU + Target GenerateSatelliteAssemblies: + No input files were specified for target GenerateSatelliteAssemblies, skipping. + Target GenerateTargetFrameworkMonikerAttribute: + Skipping target "GenerateTargetFrameworkMonikerAttribute" because its outputs are up-to-date. + Target CoreCompile: + Tool /Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:full /debug+ /optimize- /out:obj/Debug/ClassLibrary1.dll Class1.cs Folder/Class1.cs Properties/AssemblyInfo.cs /target:library /define:"DEBUG;TRACE" /fullpaths /nostdlib /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Xml.Linq.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Data.DataSetExtensions.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/Microsoft.CSharp.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Data.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Xml.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Core.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/mscorlib.dll /warn:4 +/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Class1.cs(11): warning CS0169: The private field `ClassLibrary1.Class1.BadImageFormatExcep' is never used +/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Folder/Class1.cs(11): warning CS0169: The private field `ClassLibrary1.Folder.Class1.foo' is never used + Target DeployOutputFiles: + Copying file from '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/obj/Debug/ClassLibrary1.dll.mdb' to '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/bin/Debug/ClassLibrary1.dll.mdb' + Copying file from '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/obj/Debug/ClassLibrary1.dll' to '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/bin/Debug/ClassLibrary1.dll' + Done building project "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/ClassLibrary1.csproj". + Target CopyFilesMarkedCopyLocal: + Copying file from '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/bin/Debug/ClassLibrary1.dll' to '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/bin/Debug/ClassLibrary1.dll' + Copying file from '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/bin/Debug/ClassLibrary1.dll.mdb' to '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/bin/Debug/ClassLibrary1.dll.mdb' + Target GenerateSatelliteAssemblies: + No input files were specified for target GenerateSatelliteAssemblies, skipping. + Target GenerateTargetFrameworkMonikerAttribute: + Skipping target "GenerateTargetFrameworkMonikerAttribute" because its outputs are up-to-date. + Target CoreCompile: + Tool /Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:full /debug+ /optimize- /out:obj/Debug/ConsoleApplication1.exe Program.cs Properties/AssemblyInfo.cs /target:exe /define:"DEBUG;TRACE" /fullpaths /nostdlib /platform:AnyCPU /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Xml.Linq.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Data.DataSetExtensions.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/Microsoft.CSharp.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Data.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Xml.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/System.Core.dll /reference:/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/bin/Debug//ClassLibrary1.dll /reference:/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/mscorlib.dll /warn:4 +/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs(14): warning CS0168: The variable `foo' is declared but never used +/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs(15): warning CS0168: The variable `sgedf' is declared but never used +/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs(16): warning CS0219: The variable `x' is assigned but its value is never used + Target _CopyAppConfigFile: + Skipping target "_CopyAppConfigFile" because its outputs are up-to-date. + Target DeployOutputFiles: + Copying file from '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/obj/Debug/ConsoleApplication1.exe.mdb' to '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/bin/Debug/ConsoleApplication1.exe.mdb' + Copying file from '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/obj/Debug/ConsoleApplication1.exe' to '/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/bin/Debug/ConsoleApplication1.exe' +Done building project "/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.csproj". + +Build succeeded. + +Warnings: + +/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.csproj (default targets) -> +/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets (ResolveProjectReferences target) -> +/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/ClassLibrary1.csproj (default targets) -> +/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/xbuild/12.0/bin/Microsoft.CSharp.targets (CoreCompile target) -> + + /Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Class1.cs(11): warning CS0169: The private field `ClassLibrary1.Class1.BadImageFormatExcep' is never used + /Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Folder/Class1.cs(11): warning CS0169: The private field `ClassLibrary1.Folder.Class1.foo' is never used + +/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.csproj (default targets) -> +/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/xbuild/12.0/bin/Microsoft.CSharp.targets (CoreCompile target) -> + + /Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs(14): warning CS0168: The variable `foo' is declared but never used + /Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs(15): warning CS0168: The variable `sgedf' is declared but never used + /Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs(16): warning CS0219: The variable `x' is assigned but its value is never used + + 5 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:01.1888770 + +Compilation finished at Fri Feb 20 22:55:07 diff --git a/init.el b/init.el @@ -303,7 +303,7 @@ ("melpa-stable" . "https://stable.melpa.org/packages/") ("melpa" . "https://melpa.org/packages/"))) '(package-selected-packages - '(editorconfig forge elfeed-tube-mpv elfeed-tube cider restclient-jq graphviz-dot-mode consult-eglot jq-mode multiple-cursors ob-restclient restclient vterm deadgrep helpful pdf-tools paredit-menu paredit corfu sly eglot aggressive-indent project nov nhexl-mode elfeed magit yaml-mode json-mode lua-mode go-mode geiser-guile geiser org-roam org-contrib org ace-window expand-region consult marginalia uuidgen request diminish which-key)) + '(csharp-mode editorconfig forge elfeed-tube-mpv elfeed-tube cider restclient-jq graphviz-dot-mode consult-eglot jq-mode multiple-cursors ob-restclient restclient vterm deadgrep helpful pdf-tools paredit-menu paredit corfu sly eglot aggressive-indent project nov nhexl-mode elfeed magit yaml-mode json-mode lua-mode go-mode geiser-guile geiser org-roam org-contrib org ace-window expand-region consult marginalia uuidgen request diminish which-key)) '(pcomplete-ignore-case t t) '(pixel-scroll-precision-mode t) '(read-buffer-completion-ignore-case t)