Commit Graph
100 Commits
Author SHA1 Message Date
Andrew Kaster e257c320db jakt: Add new keywords and operators (#4021)
Since July, jakt has added boxed enums, compile time functions, the
start of inheritance and virtual functions, guard expressions, and
pattern matching using the is operator.
2022-09-03 10:13:54 +02:00
Jeremy Rifkin b8a6c49afb Added AVX 512 types to C++ syntax highlighting (#4017) 2022-09-03 01:15:05 +02:00
Rubén Rincón Blanco 16b176235a JBOF: Just a Bunch of Fixes (#3957)
- Renames orphancompiler.py script to propscheck.py, the name fits better
- Fixes Go props to make them easier to maintain
- Alphabetically sorts some listings in the code
- Adds tests to the props checker script (No idea how to integrate those so it's manual for now)
- Adds 2 missing limit cases for Motd filtering
2022-08-13 01:39:41 +02:00
Matt Godbolt 5bd729da21 Adds dxc configuration cc @jeremyong 2022-08-09 20:51:08 -05:00
Jeremy Ong d928bccf5a Add preliminary HLSL support (#3932)
* Add preliminary HLSL support

- Adds a new language mode to monaco, extending the base C++ layer with
  HLSL intrinsics and types
- Adds a new `HLSLCompiler` class
- Adds a sample pixel shader

The compiler used to test this locally is the [DirectX Shader
Compiler](https://github.com/microsoft/DirectXShaderCompiler) (aka DXC),
which needs to also be added to the
[infra](https://github.com/compiler-explorer/infra) project.

Some guidance is needed before this PR can be merged:

1. While DXC can run on Linux, there are no binaries available so this
   compiler must be built. Are there examples that show how we should do
   this as part of the infra CI/CD? Should we build and host it
   separately instead? The build process for DXC on Linux is relatively
   straightforward and documented
   [here](https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DxcOnUnix.rst).
2. The example code doesn't compile unless the user also supplies
   additional compiler flags `-T ps_6_6 -E PSMain`. Is there a way to
   load these flags conditionally only if the sample is loaded?
3. Technically, DXC emits DXIL IR (based on LLVM IR) and I am wondering
   if it's possible to extend an existing LLVM backend. In addition, the
   `-spirv` compiler flag could be emitted to target the SPIR-V backend
   instead, so I'm curious if there is a good way to express the target
   backend.

Signed-off-by: Jeremy Ong <jeremycong@gmail.com>

* Fix copyright dates, remove unnecessary strict usage, and remove
placeholder logo

Signed-off-by: Jeremy Ong <jeremycong@gmail.com>

* Rebase and remove unneeded HLSL logo

Signed-off-by: Jeremy Ong <jeremycong@gmail.com>

* Fix lint errors

Signed-off-by: Jeremy Ong <jeremycong@gmail.com>

* Simply HLSL sample and remove default config

Signed-off-by: Jeremy Ong <jeremycong@gmail.com>
2022-08-09 07:32:19 -05:00
Mats Larsen 1f5fbe0e28 Replace provide-plugin jquery imports with import statements (#3943) 2022-08-07 11:58:16 +02:00
Mats Larsen ddc2b4fc87 Add remaining keywords to Carbon (#3904) 2022-07-24 10:29:13 +02:00
Matt Godbolt 50a1eedf01 Add support for Carbon (#3885)
Add support for the Carbon language prototype.
2022-07-19 09:42:25 -05:00
TrMen ed4c5814ae Add the jakt programming language (#3845) 2022-07-09 17:03:23 +02:00
Patrick Quist 5452166ae1 Toit (#3808) 2022-06-24 22:07:40 +02:00
Mats Larsen fe688a15b6 Create minimal support implementation for MLIR (#3733) 2022-06-01 14:46:43 +02:00
Jeremy Rifkin 0954019f92 Update ptx-mode rules (#3687) 2022-05-19 13:26:50 +02:00
Rubén Rincón BlancoandMatt Godbolt 2dbca646f0 Address some low-hanging fruits from webstorm code inspection (#3582)
* Address some low-hanging fruits from webstorm code inspection
* Change editor code to silence eslint

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2022-04-29 14:24:29 -05:00
Mats Larsen a1a1026a8e Move static/modes/_all.js to TypeScript (#3540) 2022-04-24 20:54:58 +02:00
Mats Larsen 4f9a34c511 Also enable prettier for recursive directories in static (#3539)
* Also enable prettier for recursive directories in static

* Fix formatting

* Fixes
2022-04-24 19:11:48 +02:00
Jeremy Rifkin ad7d810b74 Support MSVC's backtick strings (#3423)
* Support msvc's backtick strings

* Support for strings at the start of a line
2022-03-07 11:15:49 +01:00
Jeremy Rifkin 25efbd7ce6 Fix string highlighting for msvc output (#3403) (#3405) 2022-02-26 13:38:57 -06:00
Rubén Rincón Blanco 42c7b2b694 Make eslint work on static ts files (#3304) 2022-02-03 18:04:50 +01:00
Rubén Rincón Blanco 845b633441 Add single quote for strings in asm mode (#3157)
* Add single quote for strings in asm mode

* Remove unreleated changes

* Change singlequote token
2021-12-12 17:42:52 +01:00
Patrick Quist cdf295665b More Erlang keywords (#3130) 2021-11-22 00:06:24 +01:00
Patrick Quist 2bc71691ef Erlang highlight and add to amazon (#3129) 2021-11-21 23:53:43 +01:00
Mats Larsen 729433e214 Temporarily fix security vulnerability in crystal-mode regex 2021-10-14 11:07:17 +02:00
Mats Larsen 9904a6ee51 Make each mode a ts module 2021-10-12 16:11:56 +02:00
Mats Larsen 2f83604654 Rename all mode files to .ts in preparation for #3027 2021-10-12 15:45:18 +02:00
Matt Godbolt 184e58e569 Some tweaks to regexes. Not that I could get the crystal one to work 2021-09-27 22:39:34 -05:00
Patrick Quist 5e5e60159a Multifile/IDE mode (#2725) 2021-08-26 21:57:07 +02:00
Jason Zheng 750f076f8d Add generic keywords to OpenCL C and C++ for OpenCL (#2869)
The generic and __generic keywords are currently reserved in the OpenCL C
specification. They have already been added as keywords in Clang. Without
highlighting, it can seem as if generic is not an address space, as the
other address spaces are highlighted. This can be seen in the AST viewer
on Compiler Explorer. The lack of highlighting makes the AST less convenient
from a user-perspective.

C++ for OpenCL inherits address space behavior from OpenCL C v2.0 s6.5, so
this change applies to both OpenCL C and C++ for OpenCL.
2021-08-24 15:23:28 +02:00
Quinton Miller 7e1835fa0f Add support for Ruby (#2816) 2021-07-30 16:29:37 -04:00
RabsRincon 2c92738f0d Alphabetically reorder _all.js modes imports 2021-07-27 11:01:16 +02:00
RabsRincon 6cd6a37f86 Rename all-editor-modes.js to _all.js 2021-07-27 10:41:16 +02:00
Matt Godbolt 8172d95892 Tweaks to amazon config 2021-07-25 21:40:45 -05:00
Michał Cichoń 3bce751739 Add support for Circle (https://www.circle-lang.org/) (#2808)
* Add support for circle-lang (closes #1845)
* Add circle-128 version.
* Support keywords starting with @ (thanks Matt!)
2021-07-25 21:26:00 -05:00
RabsRincon db6626e3e8 Reassign my copyright to Compiler Explorer Authors 2021-07-24 00:51:34 +02:00
RabsRincon 9389bec2c0 Move editor moves to a single file 2021-07-23 05:00:51 +02:00
Quinton Miller 9829915b27 Improve handling of Crystal's quoted labels (#2789) 2021-07-19 21:51:43 -05:00
Jason Zheng 18a03e5577 Add C++ for OpenCL language (#2771) 2021-07-13 09:24:13 -05:00
partouf 2eebf0372f lint fixes 2021-07-08 14:40:41 +00:00
Quinton MillerandPatrick Quist 94ecb093a0 Add Crystal support (#2732)
* Add Crystal support

* Fix copyright

* Add ASM parser for Crystal

* Add supportsLibraryCodeFilter

* Update crystal-mode.js

* use baseName

* Force `square` call

* Update default snippet

Co-authored-by: Patrick Quist <partouf@gmail.com>
2021-07-08 00:23:48 +02:00
Jason Zheng 70cb841daf Add OpenCL C language (#2752) 2021-07-06 08:32:22 -05:00
Matt Godbolt 197ee6a734 Fix copyright date 2021-06-26 11:10:24 -05:00
Matt Godbolt 8c2bed4819 Updates to better support cppx-blue
With @hsutter
2021-06-25 17:23:51 -05:00
Matt Godbolt d96bd4eb99 Now we're using monaco 0.24.0 we can remove this and close #879 2021-05-27 22:02:20 -05:00
Matt Godbolt 5da8e09b71 Temporary workaround for #879 2021-03-28 16:49:42 -05:00
Matt Godbolt d2ccba8926 Upgrade to monaco 0.23
* Fixes a few cases where we weren't require()ing monaco
* Removes unneeded change to cppp now it's been upstreamed.

Closes #878
2021-03-28 16:08:48 -05:00
partouf a67100a717 fixes #2454 2021-03-13 16:28:41 +00:00
Austin Morton de85aecc7d Normalize and enforce license disclaimer headers (#2234) 2020-09-27 00:20:19 -04:00
Matt Godbolt f68198af9e Reassign copyright to Compiler Explorer Authors (#2233) 2020-09-26 17:50:40 -05:00
sdgoodrick a41d7becf6 add support for cppx blue and gold languages (#2144) 2020-08-20 16:27:15 +02:00
Rubén Rincón BlancoandAustin Morton ccff4b9ee5 Add new eslint rules (#2121)
The largest changes here are:
- enforcing single quotes for strings
- enforcing trailing commas where possible

In addition to those we have enabled several eslint plugins:
- plugin:requirejs/recommended, to enforce some conventions in require statements
- plugin:node/recommended, to enforce correct usage of various node.js APIs
- plugin:unicorn/recommended, which contains a pretty mixed bag of useful rules

This PR attempts to not change code behavior when possible.  In cases where fixing
existing code would change semantics, a linting exclusion has been placed in the 
code base to silence the error.  You can find these by searching for `eslint-disable-next-line`.

Co-authored-by: Austin Morton <austinpmorton@gmail.com>
2020-08-04 16:39:02 -04:00
pbrubakerandPete Brubaker d1a48657fe Update ispc-mode.js (#2108)
* Update ispc-mode.js
* Add uint* types for syntax highlighting.
* add size_t

Co-authored-by: Pete Brubaker <pete.brubaker@intel.com>
2020-07-30 10:45:38 -05:00